Summary: | --enable-static-nss breaks build | ||
---|---|---|---|
Product: | glibc | Reporter: | Jens Elkner <elkner> |
Component: | libc | Assignee: | GOTO Masanori <gotom> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | glibc-bugs, jan |
Priority: | P3 | Flags: | fweimer:
security-
|
Version: | 2.3.5 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Last reconfirmed: | |
Bug Depends on: | |||
Bug Blocks: | 1045 | ||
Attachments: | Proposed fix for link failure of ldconfig with --enable-static-nss |
Description
Jens Elkner
2005-01-03 00:09:12 UTC
Same problem here. Just about everything I attempt to compile with static NSS glibc breaks during the build, with *exactly* the same error message described above. Glibc-2.3.3 compiles without errors, however. glibc version 2.3.3 (from ftp.gnu.org) gcc version 3.3.4 Slackware 10.1 Kernel 2.6.11.5 / 2.6.11.3 i686 architecture glibc-2.3.3 compiled with the following flags: ../glibc-2.3.3/configure --enable-add-ons=linuxthreads --prefix=/usr/local/glibc-static-2.3.3 --enable-static-nss Packages compiled with the above libraries use the following flags: ./configure --disable-nls (--disable-shared) and make LDFLAGS="(-static | -all-static) -L/usr/local/glibc-static-2.3.3/lib -Wl,--start-group -lc -lnss_files -lnss_dns -lresolv -Wl,--end-group" Have tried compiling with CFLAGS+="-static" and similar to no avail, as well with --disable-shared with individual packages, which also did not work. Of note is that shadow-4.06 successfully compiles with the library compiled as above. I believe this is not a Redhat bug, rather a bug in the C library which occurs when using static NSS routines. I have seen reports of it from debian, red hat, and slackware systems. I am compiling the de facto library from gnu.org. Same problem with 2.3.4... again, *exactly* the same error messages. packages will compile when linked against libraries using static nss routines; however with 2.3.4, most packages fail when linked against those libraries. Shadow-4.06 still compiles successfully with static NSS support. Build system: glibc-2.3.4 gcc-3.4.4 binutils 2.15.92.0.2 Slackware 10.1 Kernel 2.6.11.5 / 2.6.11.3 i686 architecture I saw this myself this morning building glibc-2.3.5. It seems to be a missing hunk in elf/Makefile. I have a patch that seems to solve it; I arrived at the patch by mimicing similar stanzas in other subdirectories' Makefiles, stealing an idea from Makeconfig, and tweaking Makeconfig slightly so $(otherlibs) is obeyed when linking static apps. I'll attach the patch. Created attachment 517 [details]
Proposed fix for link failure of ldconfig with --enable-static-nss
This bug report is a bit confusing because similar errors happen when building glibc-2.3.5, and when building user apps. The patch I posted fixes building glibc-2.3.5 itself. Compiling user apps with this option might require some more flags than the user is used to. I had to add -Wl,--start-group -lc -lnss_files -lnss_dns -lresolv -Wl,--end-group to the gcc commandline to get a small test program to link -static. I haven't figured out the options for g++ yet. (In reply to comment #5) > I had to add > -Wl,--start-group -lc -lnss_files -lnss_dns -lresolv -Wl,--end-group > to the gcc commandline to get a small test program to link -static. I hope you are aware this is perfectly valid as .a do not contain interlibrary dependencies. Would glibc distribute yet-to-implement libtool's .la files for it? --enable-static-nss is not a supported option. If it's broken, feel free to fix it, but don't file bugs about build issues. Use the mailing lists. *** This bug has been marked as a duplicate of 333 *** *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |