bugPSPP - Bugs: bug #39707, Patch for compilation failure with...

 
 

bug #39707: Patch for compilation failure with LDFLAGS=-Wl,--as-needed

Submitted by:  Sebastien Fabbro <sfabbro>
Submitted on:  Tue 06 Aug 2013 08:10:40 PM UTC  
 
Category: Compilation/PortabilitySeverity: 5 - Average
Status: FixedAssigned to: John Darrington <jmd>
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 11 Aug 2013 03:26:21 PM UTC, comment #3:

> So if it doesn't cause any problems, then I agree we should make this change.


It does not cause problems for me, at least.

I applied this to master.

Ben Pfaff <blp>
Project Administrator
Sat 10 Aug 2013 07:17:18 PM UTC, comment #2:

The gnulib documentation says this:

The macros also set a variable LTLIB<NAME>, that should be used when linking with libtool. Both LTLIB<NAME> and LIB<NAME> contain essentially the same option, but where LIB<NAME> contains platform dependent flags like ‘-Wl,-rpath’, LTLIB<NAME> contains platform independent flags like ‘-R’.

We do all our linking with libtool, so this suggests that LTLIBREADLINE is indeed correct.

So if it doesn't cause any problems, then I agree we should make this change.

John Darrington <jmd>
Project AdministratorIn charge of this item.
Sat 10 Aug 2013 03:25:19 PM UTC, comment #1:

John, this seems like a reasonable change (change $(LIBREADLINE) to $(LTLIBREADLINE)), but I don't understand the full effects. I'm happy to make the change, does it make sense to you?

Ben Pfaff <blp>
Project Administrator
Tue 06 Aug 2013 08:10:40 PM UTC, original submission:

Hi,

When passing LDFLAGS=-Wl,--as-needed (default in Gentoo Linux), compilation failed with the following error:

libtool: link: (cd "src/.libs" && rm -f "libpspp.so" && ln -s "libpspp-0.8.0.so" "libpspp.so")
libtool: link: ( cd "src/.libs" && rm -f "libpspp.la" && ln -s "../libpspp.la" "libpspp.la" )
/data/local/fabbros/gentoo/bin/bash ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -std=gnu99 -Wall -W -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes -Os -pipe -march=native -pipe -ftracer -frecord-gcc-switches -Wdeclaration-after-statement -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o src/ui/terminal/pspp src/ui/terminal/libui.la src/ui/libuicommon.la src/libpspp.la src/libpspp-core.la -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -L/data/local/fabbros/gentoo/usr/lib -lncurses /data/local/fabbros/gentoo/usr/lib/libreadline.so -lgsl -lgslcblas -lm -lgslcblas -lz -lm
libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -Wall -W -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes -Os -pipe -march=native -pipe -ftracer -frecord-gcc-switches -Wdeclaration-after-statement -Wl,-O1 -Wl,--hash-style=gnu -o src/ui/terminal/.libs/pspp /data/local/fabbros/gentoo/usr/lib/libreadline.so -Wl,--as-needed src/ui/terminal/.libs/libui.a src/ui/.libs/libuicommon.a src/.libs/libpspp.so src/.libs/libpspp-core.so -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -L/data/local/fabbros/gentoo/usr/lib -lncurses -lgsl -lgslcblas -lz -lm -Wl,-rpath -Wl,/data/local/fabbros/gentoo/usr/lib
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `dont_complete':
terminal-reader.c:(.text+0x3): undefined reference to `rl_attempted_completion_over'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `terminal_reader_close':
terminal-reader.c:(.text+0x51): undefined reference to `write_history'
terminal-reader.c:(.text+0x56): undefined reference to `clear_history'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `complete_command_name':
terminal-reader.c:(.text+0x7c): undefined reference to `rl_attempted_completion_over'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `terminal_reader_read':
terminal-reader.c:(.text+0x14d): undefined reference to `rl_attempted_completion_function'
terminal-reader.c:(.text+0x1c1): undefined reference to `readline'
terminal-reader.c:(.text+0x1d4): undefined reference to `rl_outstream'
terminal-reader.c:(.text+0x216): undefined reference to `add_history'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `handler':
terminal-reader.c:(.text+0x400): undefined reference to `rl_end'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `terminal_reader_create':
terminal-reader.c:(.text+0x48a): undefined reference to `rl_catch_signals'
terminal-reader.c:(.text+0x49e): undefined reference to `rl_getc_function'
terminal-reader.c:(.text+0x4a8): undefined reference to `rl_basic_word_break_characters'
terminal-reader.c:(.text+0x4b7): undefined reference to `using_history'
terminal-reader.c:(.text+0x4c1): undefined reference to `stifle_history'
terminal-reader.c:(.text+0x4fc): undefined reference to `read_history'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `complete_command_name':
terminal-reader.c:(.text+0x75): undefined reference to `rl_completion_matches'
src/ui/terminal/.libs/libui.a(src_ui_terminal_libui_la-terminal-reader.o): In function `handler':
terminal-reader.c:(.text+0x427): undefined reference to `rl_echo_signal_char'
collect2: error: ld returned 1 exit status
make[2]: *** [src/ui/terminal/pspp] Error 1
make[2]: Leaving directory `/var/tmp/portage/sci-mathematics/pspp-0.8.0/work/pspp-0.8.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sci-mathematics/pspp-0.8.0/work/pspp-0.8.0'
make: *** [all] Error 2

I am not sure whether it is on the Gentoo side or the pspp one, but the attached patch fixed the issue.

Sebastien

Sebastien Fabbro <sfabbro>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #28775:  pspp-0.8.0-as-needed.patch added by sfabbro (279B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jmd (Posted a comment)
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by sfabbro (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Aug 2013 03:26:21 PM UTCblpStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sat 10 Aug 2013 03:25:19 PM UTCblpStatusNone=>In Progress
      Assigned toNone=>jmd
    Tue 06 Aug 2013 08:10:40 PM UTCsfabbroAttached File-=>Added pspp-0.8.0-as-needed.patch, #28775

    Back to the top


    Powered by Savane 3.1-cleanup1