Re: Still confused about PIE/PIC and default build flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/22 Richard Shaw wrote:
So I run into this occasionally and it's still not clear to me. In this specific case I'm trying to build nanomq[1] and I get the following error:

/usr/bin/ld: CMakeFiles/nano_test.dir/test.c.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE

Please post a recipe to reproduce those complaints:
the .spec file (or URL), other context for building, etc.

When I build according to README.md at https://github.com/emqx/nanomq
"Building From Source", without Ninja:

   git clone https://github.com/emqx/nanomq.git ; cd nanomq
   git submodule update --init --recursive
   mkdir build && cd build
   cmake ..
   make

then I see no complaints from /usr/bin/ld.

The software package itself is low quality.  gcc complains dozens of
serious errors such as:
   nng/src/nng.c:2269:1: warning: control reaches end of non-void function [-Wreturn-type]
   nng/src/sp/protocol/mqtt/nmq_mqtt.c:271:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   nng/src/supplemental/mqtt/mqtt_qos_db.c:620:13: warning: unused variable ‘rv’ [-Wunused-variable]
     620 |         int rv = sqlite3_exec(db, "COMMIT;", 0, 0, 0);
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux