[GRASS-dev] G70: wximgview compilation issue and fix
Markus Neteler
neteler at osgeo.org
Sun Sep 11 11:18:37 PDT 2016
Hi,
when compiling GRASS GOS 7.0.svn on Fedora 24, I get
neteler at oboe wximgview]$ make
: && c++ -L/home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/lib
-L/home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/lib
-Wl,--no-undefined -Wl,-z,now -Wl,--export-dynamic
-Wl,-rpath-link,/home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/lib
-o /home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/bin/wximgview
OBJ.x86_64-pc-linux-gnu/main.o -lgrass_gis.7.0.5svn -pthread
-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8
-lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8
-lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8
-lwx_baseu-2.8 -lm
/usr/bin/ld: OBJ.x86_64-pc-linux-gnu/main.o: relocation R_X86_64_32
against `.rodata' can not be used when making a shared object;
recompile with -fPIC
OBJ.x86_64-pc-linux-gnu/main.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
../../include/Make/Module.make:16: recipe for target
'/home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/bin/wximgview'
failed
make: *** [/home/neteler/software/grass70/dist.x86_64-pc-linux-gnu/bin/wximgview]
Error 1
This patch solves it:
svn diff visualization/wximgview/Makefile
Index: visualization/wximgview/Makefile
===================================================================
--- visualization/wximgview/Makefile (revision 69435)
+++ visualization/wximgview/Makefile (working copy)
@@ -2,7 +2,7 @@
PGM = wximgview
-EXTRA_CFLAGS = $(WXWIDGETSCXXFLAGS) -DWXINTL_NO_GETTEXT_MACRO
+EXTRA_CFLAGS = $(WXWIDGETSCXXFLAGS) -DWXINTL_NO_GETTEXT_MACRO -fPIC
LIBES = $(GISLIB) $(WXWIDGETSLIB)
DEPENDENCIES = $(GISDEP)
but I am not sure if it is the right solution to be applied to SVN.
Any ideas?
Markus
More information about the grass-dev
mailing list