I am trying to distribute one self written programm and I want to make the installation as easy as possible. In first place I just used the default settings from code blocks and build the programm with shared object (ubuntu 14.04). When I checked whether the program could be started on another distribution (ubuntu 17.10), I found out that it does crash. From here started my journey to make a static link for linux which could be used on many system.
My actual progress is that far that I could compile wxwidgets again for static linking by using the following configuration
Code: Select all
./configure --prefix=/usr/local/i686-gcc --build=i686-linux --disable-shared --enable-unicode --enable-static
Code: Select all
-------------- Build: Release_static in Labskaus (compiler: GNU GCC Compiler)---------------
g++ -o bin/Release/Labskaus obj/Release/GUIFrame.o obj/Release/LabskausApp.o obj/Release/LabskausMain.o obj/Release/LabskausMain_Calibrate.o obj/Release/LabskausMain_Config.o obj/Release/LabskausMain_Settings.o obj/Release/LabskausMain_XMLList.o obj/Release/src/CCP_driver.o obj/Release/src/CCP_Frame.o obj/Release/src/CCP_Schedular_List_Element.o obj/Release/src/ECU_VarInfo.o obj/Release/src/ECU_VarLog.o obj/Release/src/LOG_Container.o obj/Release/src/rs232.o obj/Release/src/serial.o obj/Release/src/xmlECUfile.o obj/Release/tinyxml2.o -static -L/usr/local/i686-gcc/lib -pthread /usr/local/i686-gcc/lib/libwx_gtk2u_xrc-3.0.a /usr/local/i686-gcc/lib/libwx_gtk2u_qa-3.0.a /usr/local/i686-gcc/lib/libwx_baseu_net-3.0.a /usr/local/i686-gcc/lib/libwx_gtk2u_html-3.0.a /usr/local/i686-gcc/lib/libwx_gtk2u_adv-3.0.a /usr/local/i686-gcc/lib/libwx_gtk2u_core-3.0.a /usr/local/i686-gcc/lib/libwx_baseu_xml-3.0.a /usr/local/i686-gcc/lib/libwx_baseu-3.0.a -pthread -lgthread-2.0 -lX11 -lXxf86vm -lSM -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lpng -ljpeg -lexpat -lwxregexu-3.0 -lwxtiff-3.0 -lz -ldl -lm
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/local/i686-gcc/lib/libwx_baseu-3.0.a(baselib_dlunix.o): In function `wxDynamicLibrary::RawLoad(wxString const&, int)':
dlunix.cpp:(.text+0xa8): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libgio-2.0.a(libgio_2_0_la-glocalfileinfo.o): In function `lookup_gid_name':
(.text+0x10a7): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/i686-gcc/lib/libwx_baseu-3.0.a(baselib_utilsunx.o): In function `wxGetUserHome(wxString const&)':
utilsunx.cpp:(.text+0x1247): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
obj/Release/LabskausMain_Config.o: In function `LabskausFrame::getDefaultDir()':
LabskausMain_Config.cpp:(.text+0x284b): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In function `g_get_user_database_entry':
(.text+0xa4): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libgio-2.0.a(libgio_2_0_la-glocalfileinfo.o): In function `lookup_uid_data':
(.text+0xf24): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libX11.a(xim_trans.o): In function `_XimXTransSocketINETConnect':
(.text+0xdfe): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/i686-gcc/lib/libwx_baseu-3.0.a(baselib_utilsunx.o): In function `wxGetFullHostName(wchar_t*, int)':
utilsunx.cpp:(.text+0x4e2c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libgio-2.0.a(libgio_2_0_la-gnetworkaddress.o): In function `g_network_address_parse':
(.text+0xbb9): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libgio-2.0.a(libgio_2_0_la-gnetworkaddress.o): In function `g_network_address_parse':
(.text+0xbd0): warning: Using 'endservent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 10 warning(s) (0 minute(s), 0 second(s))