Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4590

link problem if perl built with -fstack-protector

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9.x
    • Fix Version/s: ---
    • Component/s: bindings_swig_perl
    • Labels:
      None

      Description

      building swig-pl has issues on platforms missing stack protection in libc like
      SunOS.
      
      example failure:
      ===> Building for p5-subversion-1.9.0
      /opt/local/bin/pdksh
      "/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/libtool" --tag=CC
      --silent --mode=compile gcc -I/opt/local/include -I/opt/local/include/apr-1
      -I/usr/include   -DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
      -D_LARGEFILE64_SOURCE  -O2 -I/opt/local/include -I/opt/local/include/apr-1
      -I/usr/include   -O2 -I/opt/local/include -I/opt/local/include/apr-1
      -I/usr/include  
      -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion 
      -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion/include 
      -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion/bindings/swig
       -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion/bindings/swig/include  -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion/bindings/swig/proxy  -I/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/subversion/bindings/swig/proxy  -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -I/opt/local/include  -D_REENTRANT -O2 -pthread -I/opt/local/include -I/usr/include -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV  -I/opt/local/lib/perl5/5.22.0/i386-solaris-thread-multi/CORE -I./subversion/include -I./subversion  -I/opt/local/include/apr-1   -I/opt/local/include/apr-1 -I/opt/local/include     -I/opt/local/include -I/opt/local/include/serf-1 -I/opt/local/include -o subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.lo -c subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
      cd subversion/bindings/swig/perl/libsvn_swig_perl && /opt/local/bin/pdksh
      "/tmp/pkgsrc/devel/p5-subversion/work/subversion-1.9.0/libtool" --tag=CC
      --silent --mode=link gcc  -O2 -I/opt/local/include -I/opt/local/include/apr-1
      -I/usr/include   -O2 -I/opt/local/include -I/opt/local/include/apr-1
      -I/usr/include  -L/opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3
      -Wl,-R/opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3 -L/opt/local/lib
      -Wl,-R/opt/local/lib -L/usr/lib -Wl,-R/usr/lib  -L/opt/local/lib
      -L/opt/local/lib   -L/opt/local/lib  -rpath /opt/local/lib -version-info 0  -o
      libsvn_swig_perl-1.la  swigutil_pl.lo -lsvn_delta-1 -lsvn_subr-1
      -L/opt/local/lib -laprutil-1 -L/opt/local/lib -lapr-1   -lsocket
      Undefined			first referenced
       symbol  			    in file
      __stack_chk_fail_local              .libs/swigutil_pl.o  (symbol scope specifies
      local binding)
      ld: fatal: symbol referencing errors. No output written to
      .libs/libsvn_swig_perl-1.so.0.0.0
      collect2: error: ld returned 1 exit status
      
      In this case, the output of cc options are correctly gathered:
      $ perl -MExtUtils::Embed -e ccopts
       -D_REENTRANT -O2 -pthread -I/opt/local/include -I/usr/include -fwrapv
      -fno-strict-aliasing -pipe -fstack-protector-strong -I/opt/local/include
      -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
      -DPERL_USE_SAFE_PUTENV  -I/opt/local/lib/perl5/5.22.0/i386-solaris-thread-multi/CORE
      
      but not for ld:
      $ perl -MExtUtils::Embed -e ldopts
        -R /opt/local/lib/perl5/5.22.0/i386-solaris-thread-multi/CORE  
      -L/opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3
      -Wl,-R/opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3  -pthread 
      -L/opt/local/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/opt/local/lib
      -fstack-protector-strong -L/usr/gnu/lib  
      -L/opt/local/lib/perl5/5.22.0/i386-solaris-thread-multi/CORE -lperl -lm -ldl
      -lsocket -lnsl -lpthread -lrt
      
      (notice '-fstack-protector-strong')
      

      Original issue reported by risto3

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              subversion-importer Subversion Importer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: