Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465026 - =net-fs/samba-3.6.13 USE=aio - lib/system.o: In function `sys_aio_read': system.c:(.text+0x13b1): undefined reference to `aio_read64'
Summary: =net-fs/samba-3.6.13 USE=aio - lib/system.o: In function `sys_aio_read': syst...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-08 04:01 UTC by Reuben Martin
Modified: 2019-07-10 18:29 UTC (History)
6 users (show)

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


Attachments
Build Log (samba-build.log,68.56 KB, text/plain)
2013-04-08 13:55 UTC, Reuben Martin
Details
emerge info (emerge-info.log,4.91 KB, text/plain)
2013-04-08 13:58 UTC, Reuben Martin
Details
Prakash's emerge --info (emerge.info,5.22 KB, text/plain)
2013-05-18 09:51 UTC, Prakash Punnoor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2013-04-08 04:01:24 UTC
I tested 3.6.12 also, and it doesn't build either. (even though it had built previously in the past) I suspect it may have something to do with latest updateto glibc-2.17.0. The samba config does not detect availability of aio suspend64. And that is also where the failure takes place when linking.

Builds ok with aio USE flag disabled.

---
Linking non-shared library bin/libaddns.a
Compiling lib/system.c
Linking shared library bin/libnetapi.so.0
lib/system.o: In function `sys_aio_read':
system.c:(.text+0x13b1): undefined reference to `aio_read64'
lib/system.o: In function `sys_aio_write':
system.c:(.text+0x13c1): undefined reference to `aio_write64'
lib/system.o: In function `sys_aio_return':
system.c:(.text+0x13d1): undefined reference to `aio_return64'
lib/system.o: In function `sys_aio_cancel':
system.c:(.text+0x13e1): undefined reference to `aio_cancel64'
lib/system.o: In function `sys_aio_error':
system.c:(.text+0x13f1): undefined reference to `aio_error64'
lib/system.o: In function `sys_aio_fsync':
system.c:(.text+0x1401): undefined reference to `aio_fsync64'
lib/system.o: In function `sys_aio_suspend':
system.c:(.text+0x1411): undefined reference to `aio_suspend64'
collect2: error: ld returned 1 exit status
make: *** [bin/libnetapi.so.0] Error 1


Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-04-08 11:12:20 UTC
1) Please attach your complete build log.
2) Please reply with the output of `emerge --info =net-fs/samba-3.6.13`.
Comment 2 Reuben Martin 2013-04-08 13:55:04 UTC
Created attachment 344830 [details]
Build Log
Comment 3 Reuben Martin 2013-04-08 13:58:02 UTC
Created attachment 344832 [details]
emerge info

Please note that the emerge info shows aio USE flag disabled since the last successful build had it manually set that way. Normally it is enabled.
Comment 4 Patrick Lauer gentoo-dev 2013-04-09 08:35:44 UTC
Cannot reproduce on ~amd64, even with glibc 2.17.

I wonder why in your build log some parts get built as non-shared (i.e. static) libraries?
Comment 5 Reuben Martin 2013-04-09 14:58:54 UTC
This image was built on in a KVM/QMEU environment, and then deployed on a VMware host. Is there anything in the configure stage for samba that a VMware environment could influence somehow?
Comment 6 Reuben Martin 2013-04-09 22:03:15 UTC
Think I may have found something. Every time I try to emerge samba, a conftest segfault shows up in dmesg similar to:

conftest[13905]: segfault at 1 ip 0000000000000001 sp 00007fff038f9928 error 4 in conftest[400000+1000]
Comment 7 Rene Meier 2013-04-30 07:13:03 UTC
I can see exactly the same error. After commenting out LDFLAGS in my make.conf it compiles fine and I can use the samba client functionality without problems. My LDFLAGS was "-Wl,-O1". Please try without LDFLAGS set.
Comment 8 Reuben Martin 2013-05-01 01:44:37 UTC
Nice catch. Linker optimizations would have been the last thing I would have considered. First time I've ever seen this linker flag cause any sort of issue.

Confirmed that it works for me.
Comment 9 Reuben Martin 2013-05-08 19:43:00 UTC
With the recent package bump in portage, I ran into problems again.

I had set up in portage as custom build environment for building samba where is set LDFLAGS=""

Well, that fails for me the same as it did earlier. I've found that it's not enough just to redefine LDFLAGS, it must not be set at all. I think this has less to do with linking errors resulting from the linker optimization flag, and probably has more to do with a broken build system method of appending text to LDFLAGS when it has already been defined.
Comment 10 Prakash Punnoor 2013-05-18 09:49:50 UTC
Same here with net-fs/samba-3.6.14-r1 USE="aio client cups fam netapi pam readline server smbclient winbind"
Comment 11 Prakash Punnoor 2013-05-18 09:50:17 UTC
(In reply to comment #10)
> Same here with net-fs/samba-3.6.14-r1 USE="aio client cups fam netapi pam
> readline server smbclient winbind"

BTW, I could emerge with LDFLAGS=""
Comment 12 Prakash Punnoor 2013-05-18 09:51:26 UTC
Created attachment 348604 [details]
Prakash's emerge --info
Comment 13 Ben Kohler gentoo-dev 2019-07-10 18:29:59 UTC
Please reopen if this is still an issue with samba-4.x