This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/20064] New: Linking stapio failed because of misplaced libraries flags


https://sourceware.org/bugzilla/show_bug.cgi?id=20064

            Bug ID: 20064
           Summary: Linking stapio failed because of misplaced libraries
                    flags
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: francis.giraldeau at gmail dot com
  Target Milestone: ---

Created attachment 9245
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9245&action=edit
Makefile fix example

The linking of stapio failed because of unkown symbols. However, the
corresponding libraries are available on the system. The compilation command
is:

gcc -Wall -Wextra -Werror -Wunused -W -Wformat=2 -ljson-c  -lpanel -lncurses
-ltinfo  -g -O2 -fstack-protector-all -D_FORTIFY_SOURCE=2   -o stapio stapio.o
mainloop.o common.o ctl.o relay.o relay_old.o monitor.o libstrfloctime.a
-lpthread 


However, the libraries defined in AM_CFLAGS (namely -ljson-c  -lpanel -lncurses
-ltinfo) are added before the target output and are not used for linking. The
correct command is therefore: 

gcc -Wall -Wextra -Werror -Wunused -W -Wformat=2 -g -O2 -fstack-protector-all
-D_FORTIFY_SOURCE=2   -o stapio stapio.o mainloop.o common.o ctl.o relay.o
relay_old.o monitor.o libstrfloctime.a -lpthread -ljson-c  -lpanel -lncurses
-ltinfo

I changed the Makefile.am with the attached patch and it fixes the issue. I'm
not sure however if this is the proper fix. After applying the patch, one
should regenerate the Makefile.in by running automake, then regenerate the
Makefile by running configure.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]