bugGNU Octave - Bugs: bug #57955, [octave forge] (parallel) build...

 
 

bug #57955: [octave forge] (parallel) build complains about missing -fPIC flag at link stage

Submitter:  A.R. Burgers <arb>
Submitted:  Thu 05 Mar 2020 07:33:05 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 11 Apr 2020 09:41:38 AM UTC, comment #6: 

Thanks for investigating, hopefully fixed by:

https://sourceforge.net/p/octave/parallel/ci/08e0b9e28d7b1fcb71c93a9c93083438cbc9bfb0/

Please re-open if necessary.

Olaf Till <i7tiol>
Group Member
Fri 06 Mar 2020 07:27:33 PM UTC, comment #5: 

Ok, confirmed by looking carefully at the build output here as well. The value of 'CPICFLAG' should probably be passed in to the 'gl' directory. But on my system, the build/install does not fail even with that option missing. So only seems to affect some, probably older, systems.

Mike Miller <mtmiller>
Group Member
Fri 06 Mar 2020 09:31:51 AM UTC, comment #4: 

with pkg install -verbose parallel-3.1.3.tar.gz (created from current hg)

-fPIC seems to be missing here:


depbase=`echo perror.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..    -DEXTERNAL_BINARY -g -O2 -MT perror.o -MD -MP -MF $depbase.Tpo -c -o perror.o perror.c &&\
        mv -f $depbase.Tpo $depbase.Po


-fPIC is included in other compiles


CXXFLAGS="-O3 -Wno-expansion-to-defined " /opt/apps/shared/user/x86_64/bin/mkoctfile-5.2.1 --verbose -c fload.cc
x86_64-pc-linux-gnu-c++ -c -I/opt/apps/shared/user/x86_64/include/suitesparse -DQT_NO_DEBUG=1 -I/opt/apps/shared/user/x86_64/include -fPIC -I/opt/apps/shared/user/x86_64/include/octave-5.2.1/octave/.. -I/opt/apps/shared/user/x86_64/include/octave-5.2.1/octave -I/opt/apps/shared/user/x86_64/include  -pthread -fopenmp -O3 -Wno-expansion-to-defined     fload.cc -o fload.o


A.R. Burgers <arb>
Thu 05 Mar 2020 11:08:54 PM UTC, comment #3: 

Building the parallel package works for me with that configuration.

Mike Miller <mtmiller>
Group Member
Thu 05 Mar 2020 09:36:48 PM UTC, comment #2: 

Yes, -fPIC is in CXXPICFLAG


mkoctfile --version
mkoctfile, version 5.2.1

mkoctfile -p CXXPICFLAG
-fPIC


A.R. Burgers <arb>
Thu 05 Mar 2020 07:51:45 PM UTC, comment #1: 

I can't reproduce this, and this isn't really a parallel package bug. Your Octave installation should be adding the -fPIC option (or system-dependent equivalent) automatically when it's needed. This isn't something packages need to worry about.

What does 'mkoctfile -p CXXPICFLAG' print? If it's not '-fPIC', then something may be wrong with your Octave install.

Mike Miller <mtmiller>
Group Member
Thu 05 Mar 2020 07:33:05 AM UTC, original submission:  

Building current mercurial 292:52f75987dd97 I get a linktime error message.

Manually adding -fPIC manually to CFLAGS/CXXFLAGS in config.status does allow the build to complete.


mkoctfile-5.2.1 -pthread -o parallel_interface.oct pconnect.o select_sockets.o network_get_info.o network_set.o sclose.o reval.o precv.o psend.o __octave_server__.o p-connection.o p-streams.o error-helpers.o minimal-load-save.o           -pthread gl/libgnu.a gnulib-wrappers.o
/opt/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: gl/libgnu.a(perror.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: gl/libgnu.a(strerror_r.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [parallel_interface.oct] Error 1


A.R. Burgers <arb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by arb (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-11 i7tiol StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2020-03-06 mtmiller StatusWorks For Me Confirmed
    2020-03-05 mtmiller StatusNone Works For Me
    2020-03-05 siko1056 Summaryparallel package build complains about missing -fPIC flag at link stage [octave forge] (parallel) build complains about missing -fPIC flag at link stage

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code