[nas] [PATCH] Fix build failures with binutils-gold (etc.)

Steve McIntyre steve at einval.com
Tue May 3 14:27:30 MDT 2011


On Tue, May 03, 2011 at 09:33:29AM +0200, Erik Auerswald wrote:
>Hi Steve,
>
>On Sun, May 01, 2011 at 04:36:11AM +0200, Erik Auerswald wrote:
>> On 05/01/2011 03:06 AM, Erik Auerswald wrote:
>>> On 04/30/2011 06:24 PM, Steve McIntyre wrote:
>>>> A number of projects have changed default link behaviour in
>>>> binutils(-gold) such that --no-add-needed is now standard. This breaks
>>>> the nas build for various of the client programs. I've just added this
>>>> patch to the Debian package build which fixes the problem for me...
>>>
>>> The patch looks good. It adds -lXau to the build, but other than this I
>>> don't see a difference in build output on Debian/Unstable.
>>>
>>> Is there an easy way to enable the --no-add-needed option just for testing?
>>
>> I was not able to reproduce any build errors by specifying  
>> --no-add-needed as a linker option. Thus I did not see any difference in  
>> adding -lXau besides the changed compiler invocation.
>
>I think you are seeing an issue already fixed in SVN, but not in the
>release NAS version. Please take a look at
>http://radscan.com/nas/nas-ml/msg01725.html
>and the following messages in the thread.
>
>Unless you can provide evidence that there really is some problem building
>some (which?) NAS clients with the --no-add-needed linker option I will not
>add -lXau to the build.

Hmmm. OK...

Looking further - the fix is actually nothing to do with either. The
fix *is* already in svn, and it's Jon's changes to
config/NetAudio.tmpl in r281 that fix the problem. I took that
alongside my own patch, muddying the waters a little. If I back that
out too, I get:

make[4]: Leaving directory `/home/steve/debian/nas/nas-1.9.2/clients/audio/auconvert'
making all in clients/audio/auctl...
make[4]: Entering directory `/home/steve/debian/nas/nas-1.9.2/clients/audio/auctl'
gcc -g -O2 -fno-strict-aliasing     -I../../../include    -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L               -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                  -DFUNCPROTO=15 -DNARROWPROTO       -c -o auctl.o auctl.c
gcc -g -O2 -fno-strict-aliasing     -I../../../include    -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L               -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                  -DFUNCPROTO=15 -DNARROWPROTO       -c -o execute.o execute.c
rm -f auctl
gcc -o auctl auctl.o execute.o -g -O2 -fno-strict-aliasing       ../../../lib/audio/libaudio.a -lXt -lSM -lICE -lXext -lX11 -lm     
/usr/bin/ld: ../../../lib/audio/libaudio.a(ConnSvr.o): undefined reference to symbol 'XauGetBestAuthByAddr'
/usr/bin/ld: note: 'XauGetBestAuthByAddr' is defined in DSO /usr/lib64/libXau.so.6 so try adding it to the linker command line
/usr/lib64/libXau.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [auctl] Error 1
make[4]: Leaving directory `/home/steve/debian/nas/nas-1.9.2/clients/audio/auctl'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/steve/debian/nas/nas-1.9.2/clients/audio'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/steve/debian/nas/nas-1.9.2/clients'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/steve/debian/nas/nas-1.9.2'
make: *** [build] Error 2

which is where I started. Sussed!

Jon, yes - another update would probably be good.

-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
"We're the technical experts.  We were hired so that management could
 ignore our recommendations and tell us how to do our jobs."  -- Mike Andrews




More information about the Nas mailing list