patchGNU Libtool - Patches: patch #9467, Fix -export-symbols and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9467: Fix -export-symbols and -export-symbols-regex support on Solaris 11.3

Submitted by:  Bruno Haible <haible>
Submitted on:  Sat 21 Oct 2017 12:40:53 PM UTC  
 
Category: NonePriority: 7 - High
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Sat 21 Oct 2017 12:40:53 PM UTC, original submission:

The build of GNU libffcall 2.0 (which uses the libtool -export-symbols-regex option) fails on Solaris 11.3:

/bin/sh ../libtool --mode=link gcc -m64 -O2 -o libavcall.la -rpath /export/home/bruno/prefix64/lib -no-undefined -export-symbols-regex '^avcall_|^__builtin_avcall$' -version-info 1:0:0 avcall.lo avcall-libapi.lo avcall-structcpy.lo avcall-compat.lo -L/export/home/bruno/prefix64/lib
libtool: link: /usr/bin/nm -p .libs/avcall-x86_64.o .libs/avcall-libapi.o .libs/avcall-structcpy.o .libs/avcall-compat.o | | /usr/bin/gsed 's/.* //' | sort | uniq > .libs/libavcall.exp
../libtool[1721]: eval: syntax error at line 1: `|' unexpected

      • Error code 3

make: Fatal error: Command failed for target `libavcall.la'

On Solaris 11.0 this works fine:

/bin/sh ../libtool --mode=link gcc -m64 -O2 -o libavcall.la -rpath /home/bruno/prefix64/lib -no-undefined -export-symbols-regex '^avcall_|^__builtin_avcall$' -version-info 1:0:0 avcall.lo avcall-libapi.lo avcall-structcpy.lo avcall-compat.lo -L/home/bruno/prefix64/lib
libtool: link: /usr/bin/nm -p .libs/avcall-x86_64.o .libs/avcall-libapi.o .libs/avcall-structcpy.o .libs/avcall-compat.o | sed -n -e 's/^.[ ]\([BDRT][BDRT]\)[ ][ ]\([_A-Za-z][_A-Za-z0-9]\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/gsed 's/.* //' | sort | uniq > .libs/libavcall.exp
libtool: link: /usr/bin/ggrep -E -e "^avcall_|^__builtin_avcall$" ".libs/libavcall.exp" > ".libs/libavcall.expT"
libtool: link: mv -f ".libs/libavcall.expT" ".libs/libavcall.exp"
libtool: link: echo "{ global:" > .libs/libavcall.so.1.0.0.exp
libtool: link: cat .libs/libavcall.exp | /usr/bin/gsed -e "s/\(.*\)/\1;/" >> .libs/libavcall.so.1.0.0.exp
libtool: link: echo "local: *; };" >> .libs/libavcall.so.1.0.0.exp
libtool: link: gcc -m64 -O2 -shared -fPIC -DPIC -Wl,-z -Wl,text -Wl,-M -Wl,.libs/libavcall.so.1.0.0.exp -Wl,-h -Wl,libavcall.so.1 -o .libs/libavcall.so.1.0.0 .libs/avcall-x86_64.o .libs/avcall-libapi.o .libs/avcall-structcpy.o .libs/avcall-compat.o -L/home/bruno/prefix64/lib -lc -m64 -O2
libtool: link: rm -f .libs/libavcall.so.1.0.0.exp
libtool: link: (cd ".libs" && rm -f "libavcall.so.1" && ln -s "libavcall.so.1.0.0" "libavcall.so.1")
libtool: link: (cd ".libs" && rm -f "libavcall.so" && ln -s "libavcall.so.1.0.0" "libavcall.so")
libtool: link: ar cru .libs/libavcall.a avcall-x86_64.o avcall-libapi.o avcall-structcpy.o avcall-compat.o
libtool: link: ranlib .libs/libavcall.a
libtool: link: ( cd ".libs" && rm -f "libavcall.la" && ln -s "../libavcall.la" "libavcall.la" )

The reason for this error is that at configure time, we see

checking command to parse /usr/bin/nm -p output from gcc -m64 -O2 object... failed

whereas on Solaris 11.0 it is

checking command to parse /usr/bin/nm -p output from gcc -m64 -O2 object... ok

The reason for that is that the "/usr/bin/nm -p" output has slightly changed. For the test program created by configure, it is:

conftest.o:

                                        1. s
                                        2. s
                                        3. s
                                        4. s
                                        5. s
                                        6. s
                                        7. s
                                        8. b
                                        9. s
                                        10. s
                                        11. s
                                        12. s
                                        13. f conftest.c
                                        14. T main
                                        15. T nm_test_func

00000000000000000001 C nm_test_var

whereas on Solaris 11.0 it was using 'D' instead of 'C'.

With the attached patch, configure finds that the thing works, and the build of libffcall succeeds.

Bruno Haible <haible>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 21 Oct 2017 01:39:10 PM UTChaibleAttached File-=>Added 0001-Fix-export-symbols-and-export-symbols-regex-support-.patch, #42206
    Sat 21 Oct 2017 12:40:53 PM UTChaibleAttached File-=>Added 0001-Fix-export-symbols-and-export-symbols-regex-support-.patch, #42205

    Back to the top


    Powered by Savane 3.1-cleanup1