[Mesa-dev] [Bug 52167] New: llvmpipe test programs link fails when ld --as-needed option is used

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 16 20:12:05 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52167

             Bug #: 52167
           Summary: llvmpipe test programs link fails when ld --as-needed
                    option is used
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: freedesktop at blino.org


llvmpipe test programs link fails when ld --as-needed option is used:

Making all in llvmpipe
gmake[1]: Entering directory
`/home/blino/vc/mageia/packages/cauldron/mesa/BUILD/mesa-20120715/src/gallium/drivers/llvmpipe'
g++ -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
-L/usr/lib64/llvm  -lpthread -lffi -ldl -lm  lp_test_blend.o lp_test_main.o -o
lp_test_blend -Wl,--start-group  -L../../auxiliary/ -lgallium libllvmpipe.a
-lLLVM  -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm  
-ldrm   -lm -lpthread -ldl -Wl,--end-group
/usr/bin/ld: ../../auxiliary//libgallium.a(u_dl.o): undefined reference to
symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.7.1/../../../../lib64/libdl.so so try
adding it to the linker command line
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.7.1/../../../../lib64/libdl.so: could
not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
gmake[1]: *** [lp_test_blend] Error 1
gmake[1]: Leaving directory
`/home/blino/vc/mageia/packages/cauldron/mesa/BUILD/mesa-20120715/src/gallium/drivers/llvmpipe'

My ld configuration is the following:
LD='/usr/bin/ld -m elf_x86_64'
LDFLAGS=' -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id
-Wl,--enable-new-dtags'

Link goes fine is all existing -ldl options are removed, and one extra
occurence of -ldl is added after the --end-group option:

g++ -Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
-L/usr/lib64/llvm  -lpthread -lffi -lm  lp_test_blend.o lp_test_main.o -o
lp_test_blend -Wl,--start-group  -L../../auxiliary/ -lgallium libllvmpipe.a
-lLLVM  -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm  
-ldrm   -lm -lpthread -Wl,--end-group -ldl

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list