Bug 9330 - FreeBSD, linking against libmd5.so instead of libmd.so
Summary: FreeBSD, linking against libmd5.so instead of libmd.so
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.6.8
Hardware: x64 FreeBSD
: P5 regression
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8622 9323 9324 9325
  Show dependency treegraph
 
Reported: 2012-10-25 15:14 UTC by Michael Letzgus-Koppmann
Modified: 2012-12-04 10:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Letzgus-Koppmann 2012-10-25 15:14:17 UTC
Hi guys,

maybe there is a problem introduced with version 3.6.8, Bug 9037 (https://bugzilla.samba.org/show_bug.cgi?id=9037).

On FreeBSD there is a port library called "libwww" which create a md5 library in /usr/local/lib/libmd5.so.

If this library is installed then Samba 3.6.8 links against the libwww version, if not against the system version /lib/libmd.so.

Samba prior to 3.6.8 links always against /lib/libmd.so. and work fine.

Problem:

Samba does not like the libwww version of md5. Most daemons and userspace tools perform spectacular segfaults with this library.

When symlinking /usr/local/lib/libmd5.so to /lib/libmd.so everything is fine again.

Question: Is this a problem with the samba build and linking procedure or is it a problem inside this "libwww"?
Comment 1 Michael Letzgus-Koppmann 2012-10-25 15:28:05 UTC
Samba 3.6.8 source3/Makefile says "LIBS=-lmd5", but in 3.6.7 it's "LIBS=-lmd"
Comment 2 Michael Letzgus-Koppmann 2012-10-25 20:49:40 UTC
Hi!

I set up a fresh new VM with Release 9.0p3 and did the following:

1. Check if libwww is installed (of course not) or /usr/local/lib/libmd5.so is present (it isn't)

2. Compile and install the latest net/samba36-3.6.8 port with ADS option (after configure, source3/Makefile contains "LIBS=... -lmd")

3. Join a domain, play around with wbinfo

4. Compile and install the port www/libwww

5. Check for /usr/local/lib/libmd5.so, it's there now

6. "make clean reinstall" net/samba36-3.6.8 (after configure, source3/Makefile contains "LIBS=... -lmd5" (!))

7. Try "net ads join -U someuser" [segfault]

8. "/usr/local/etc/rc.d/samba restart" =>a lot of horrible segfaults, samba internal errors and error messages

9. symlink /lib/libmd.so to /usr/local/lib/libmd5.so

10. Try "net ads join -U someuser" =>success

11. "/usr/local/etc/rc.d/samba restart" =>success

12. Playing with wbinfo ;-) =>success

13. "pkg_deinstall libwww", libmd5 is away now

14. "make clean reinstall" net/samba36-3.6.8 (after configure, source3/Makefile contains "LIBS=... -lmd")

15. Everything fine again. :)
Comment 3 Andrew Bartlett 2012-11-14 06:36:36 UTC
For some reason this is filed as blocking a Samba 4.0 release.  Does it also happen in the waf (new, top level) build?  According to bug #9037 the patch that introduced this isn't even in master.
Comment 4 Stefan Metzmacher 2012-11-14 07:16:05 UTC
(In reply to comment #3)
> For some reason this is filed as blocking a Samba 4.0 release.  Does it also
> happen in the waf (new, top level) build?  According to bug #9037 the patch
> that introduced this isn't even in master.

I marked it as blocker for 4.0, because I assumed this was also in v4-0-test,
but it isn't for some strange reason, I'll some research and may port
some of the changes to v4-0-test and master. If it turns out to be really a 3.6
only thing, I'll remove it as blocker.
Comment 5 Karolin Seeger 2012-12-04 10:58:31 UTC
This one should be fixed with the patches attached to bug #9418.
Closing out bug report.
Please feel free to re-open if it's still an issue.

Thanks!