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

 
 

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

Submitter:  Sebastien Fabbro <sfabbro>
Submitted:  Tue 06 Aug 2013 08:10:40 PM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  jmd
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group administrator
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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by sfabbro (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 logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-11 blp StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2013-08-10 blp StatusNone In Progress
        Assigned toNone jmd
    2013-08-06 sfabbro Attached File- Added pspp-0.8.0-as-needed.patch, #28775

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code