Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189040 - sys-block/mbuffer-20070317 fails to find MD5_Init in -lssl due to -Wl,--as-needed
Summary: sys-block/mbuffer-20070317 fails to find MD5_Init in -lssl due to -Wl,--as-ne...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-15 20:54 UTC by Liganic
Modified: 2007-08-31 09:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The resulting config.log with the wrong value. (config.log,19.42 KB, text/plain)
2007-08-16 21:56 UTC, Liganic
Details
emerge --info (emerge.info,3.26 KB, text/plain)
2007-08-17 05:38 UTC, Liganic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liganic 2007-08-15 20:54:49 UTC
When compiling mbuffer-20070317 with USE="ssl" the ebuild fails, because configure sets the wrong library for md5 support.It gets -lmd5 which should be -lssl (a manual configure picks the right library). As result of this the ebuild later complains about a missing md5.h and crashes.

Reproducible: Always

Steps to Reproduce:
1. emerge =mbuffer-20070317 USE="ssl"

Actual Results:  
*bang* md5.h not found
Comment 1 SpanKY gentoo-dev 2007-08-16 05:41:16 UTC
you need to post real info ... saying "it fails" is not debuggable

start with the actual emerge output and the config.log in the build dir
Comment 2 Liganic 2007-08-16 06:51:47 UTC
Relevant part of emerge.log:

checking for library containing MD5Init... -lmd5
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mbuffer.1
config.status: creating config.h
mbuffer.c:32:3: Warnung: #warning Your sendfile implementation does not seem to support sending from buffers - disabling sendfile support.
mbuffer.c:41:17: Fehler: md5.h: Datei oder Verzeichnis nicht gefunden


config.log:

configure:3705: checking for library containing MD5Init
configure:3735: i686-pc-linux-gnu-gcc -o conftest -O2 -march=pentium-m -msse2 -pipe -fomit-frame-pointer  
-Wl,--as-needed conftest.c -lpthread  >&5
/var/tmp/portage/sys-block/mbuffer-20070317/temp/cc8djT5n.o: In function `main':
conftest.c:(.text+0xf): undefined reference to `MD5Init'
collect2: ld returned 1 exit status
configure:3741: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define HAVE_LIBPTHREAD 1
| #define RETSIGTYPE void
| #define _FILE_OFFSET_BITS 64
| #define HAVE_SENDFILE 1
| /* end confdefs.h.  */
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char MD5Init ();
| int
| main ()
| {
| MD5Init ();
|   ;
|   return 0;
| }
configure:3790: i686-pc-linux-gnu-gcc -o conftest -O2 -march=pentium-m -msse2 -pipe -fomit-frame-pointer  -Wl,--as-needed conftest.c -lmd5  -lpthread  >&5
configure:3796: $? = 0
configure:3800: test -z 
                         || test ! -s conftest.err
configure:3803: $? = 0
configure:3806: test -s conftest
configure:3809: $? = 0
configure:3824: result: -lmd5
configure:3967: creating ./config.status

Found under cache variables in config.log:

ac_cv_search_MD5Init=-lmd5


Hope this is verbose enough.
Comment 3 SpanKY gentoo-dev 2007-08-16 19:31:56 UTC
dont post snippets of config.log, post the whole thing as an attachment

the md5 functions should have been found in libssl (MD5_Init)
Comment 4 Liganic 2007-08-16 21:56:59 UTC
Created attachment 128333 [details]
The resulting config.log with the wrong value.
Comment 5 SpanKY gentoo-dev 2007-08-17 05:30:55 UTC
your -Wl,--as-needed is screwing things up

i noticed you *still* havent posted `emerge --info`
Comment 6 Liganic 2007-08-17 05:38:01 UTC
Created attachment 128366 [details]
emerge --info
Comment 7 Liganic 2007-08-17 05:41:20 UTC
You are right, if I temporarily change the LDFLAGS to "" it compiles just fine. So I guess the best way would be to strip the flags in the ebuild?
Comment 8 SpanKY gentoo-dev 2007-08-17 06:44:20 UTC
no, the configure script should be tweaked ... it asks for -lssl when in reality it wants -lcrypto
Comment 9 SpanKY gentoo-dev 2007-08-25 15:39:50 UTC
mbuffer-20070518 should work
Comment 10 Liganic 2007-08-31 09:49:52 UTC
I have no clue why it doesn't work but I had to strip the LDFLAGS to make it work.