|
|
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Compilation error
Compilation error [message #48595] |
Fri, 04 August 2017 12:10 |
rafiwui
Messages: 105 Registered: June 2017 Location: Stuttgart, Germany
|
Experienced Member |
|
|
When I compile the liibrary with g++ 6.3.1 on CentOS 6.9 the compilation stops at a point:
This is the (IMO) important output:
g++ -o "ide.out" -Wl,-s -L/lib64 -L"/usr/X11R6/lib" -L"/usr/lib" -Wl,-O,2 -Wl,--gc-sections -Wl,--start-group \
_out/ide/GCCMK-Gcc-Gui-Linux-Main-Posix-Shared/BaseDlg.o \
... \
-lbz2 \
-lpthread \
-ldl \
-lrt \
-lz \
-ldl \
-lfreetype \
-lfontconfig \
-lexpat \
-lgtk-x11-2.0 \
-lgdk-x11-2.0 \
-latk-1.0 \
-lgdk_pixbuf-2.0 \
-lm \
-lpangocairo-1.0 \
-lfontconfig \
-lXext \
-lXrender \
-lXinerama \
-lXi \
-lXrandr \
-lXcursor \
-lXfixes \
-lpango-1.0 \
-lcairo \
-lX11 \
-lgobject-2.0 \
-lgmodule-2.0 \
-lglib-2.0 \
-lX11 \
-lXrender \
-lXinerama \
-ldl \
-lXft \
-lnotify \
-lpng -Wl,--end-group
/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld: _out/CtrlCore/GCCMK-Gcc-Gui-Linux-Posix-Shared/CtrlCore.a(GtkApp.o): undefined reference to symbol 'g_thread_init'
//lib64/libgthread-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[1]: *** [ide.out] Error 1
Any ideas why this undefined reference to symbol 'g_thread_init' appears? Or did anyone face a similiar error?
EDIT: It seems like the real problem is //lib64/libgthread-2.0.so.0: error adding symbols: DSO missing from command line
Tested with: 11217M, 11287, 11295, 11300
And there weren't any warnings in the rest of the building process.
I added the complete output that is generated if I run sudo make again as a file.
Greetings
Daniel
[Updated on: Wed, 23 August 2017 12:45] Report message to a moderator
|
|
|
Re: Compilation error [message #48607 is a reply to message #48595] |
Tue, 08 August 2017 12:58 |
rafiwui
Messages: 105 Registered: June 2017 Location: Stuttgart, Germany
|
Experienced Member |
|
|
Googling g_thread_init, I found that it is deprecated. So probably that is the problem and I am wondering if anyone else has the same problem?
EDIT: According to my solution this was not the real problem.
Greetings
Daniel
[Updated on: Wed, 23 August 2017 12:43] Report message to a moderator
|
|
|
Re: Compilation error [message #48678 is a reply to message #48595] |
Wed, 23 August 2017 12:43 |
rafiwui
Messages: 105 Registered: June 2017 Location: Stuttgart, Germany
|
Experienced Member |
|
|
I finally found the problem or at least I did sth and now it compiled all the way through.
It would be nice if one of the admins of U++ could check this solution to solve this problem or if you could tell me what I did wrong if this is no problem of U++.
I did this with the nightly build upp-x11-src-11300 on a CentOS 6.9 machine.
So here is what I did if someone is facing a similiar error:
EDIT: Check out the ways more easier solution in the next reply.
1. Run make until you see this line (the actual compilation will start after this):
DOMAKE INFO: Found make. Compiling...
Use Ctrl+C to abort the compilation.
2. Open the domake file in an editor and remove the following lines:
log_debug_info "Configuring" uppsrc/*Makefile.in *.bm.in "with pkg-config"
if which pkg-config
then
if [[ "$Flags" = *"NOGTK"* ]]
then
requires_libraries="x11 libnotify freetype2"
else
requires_libraries="gtk+-2.0 x11 libnotify freetype2"
fi
library_list=""
for i in $requires_libraries
do
if pkg-config --exists $i
then
library_list="$library_list $i"
log_debug_info "pkg-config: Found library $i"
else
log_debug_warning "pkg-config: '$i' not found in $(pkg-config --variable pc_path pkg-config). Do you need to install $i development package?"
fi
done
for i in uppsrc/*Makefile.in
do
sed -e "s@-I((INCLUDES))@`pkg-config --cflags-only-I $library_list`@g" -e "s@-L\"((LIBRARIES))\"@`pkg-config --libs-only-L $library_list`@g" "$i" > "${i%.in}"
done
for i in *.bm.in
do
sed -e "s@((INCLUDES))@`pkg-config --cflags-only-I $library_list|sed -e s/-I//g -e \"s/ /;/g\"`@g" -e "s@((LIBRARIES))@`pkg-config --libs-only-L $library_list|sed -e s/-L//g -e \"s/ /;/g\"`@g" "$i" > "${i%.in}"
done
else
log_debug_warning "Can't find pkg-config in PATH. Will do configuration without it. Compilation will probably fail"
log_debug_warning "If compilation fail because of missing include, please install pkg-config before reporting"
for i in uppsrc/*Makefile.in
do
sed -e "s@-I((INCLUDES))@@g" -e 's@-L"((LIBRARIES))"@@g' "$i" > "${i%.in}"
done
for i in *.bm.in
do
sed -e "s@((INCLUDES));@@g" -e "s@((LIBRARIES));@@g" "$i" > "${i%.in}"
done
fi
This won't corrupt the compilation because the pkg-config is already done if you did the first step.
You can also use the attached file instead (the pkg-config part is commented out there)
3. Open uppsrc/Makefile and uppsrc/Makefile.in and add this line:
here:
# ...
$(OutFile): build_info \
$(OutDir_ide)BaseDlg.o \
$(OutDir_ide)SelectPkg.o \
$(OutDir_ide)UppWspc.o \
$(OutDir_ide)NewPackageFile.o \
$(OutDir_ide)UppDlg.o \
$(OutDir_ide)Template.o \
$(OutDir_ide)Console.o \
$(OutDir_ide)FindFile.o \
$(OutDir_ide)FindInFiles.o \
$(OutDir_ide)Config.o \
$(OutDir_ide)ide.o \
$(OutDir_ide)idefile.o \
$(OutDir_ide)EditorTabBar.o \
$(OutDir_ide)Bottom.o \
$(OutDir_ide)t.o \
$(OutDir_ide)Cpp.o \
$(OutDir_ide)Assist.o \
$(OutDir_ide)DCopy.o \
$(OutDir_ide)ContextGoto.o \
$(OutDir_ide)GoToLine.o \
$(OutDir_ide)Swaps.o \
$(OutDir_ide)ParamInfo.o \
$(OutDir_ide)Navigator.o \
$(OutDir_ide)Annotations.o \
$(OutDir_ide)Virtuals.o \
$(OutDir_ide)Thisbacks.o \
$(OutDir_ide)Jump.o \
$(OutDir_ide)Setup.o \
$(OutDir_ide)Custom.o \
$(OutDir_ide)Print.o \
$(OutDir_ide)Insert.o \
$(OutDir_ide)idetool.o \
$(OutDir_ide)Install.o \
$(OutDir_ide)Android.o \
$(OutDir_ide)idebar.o \
$(OutDir_ide)idewin.o \
$(OutDir_ide)About.o \
$(OutDir_ide)Help.o \
$(OutDir_ide)Macro.o \
$(OutDir_ide)OnlineSearch.o \
$(OutDir_ide)Errors.o \
$(OutDir_ide)Calc.o \
$(OutDir_ide)FormatCode.o \
$(OutDir_ide)Abbr.o \
$(OutDir_ide)Qtf.o \
$(OutDir_ide)Xml.o \
$(OutDir_ide)Json.o \
$(OutDir_ide)MacroManager.o \
$(OutDir_ide)Update.o \
$(OutDir_ide)MethodsCtrls.o \
$(OutDir_ide)Methods.o \
$(OutDir_ide)AutoSetup.o \
$(OutDir_ide)InstantSetup.o \
$(OutDir_ide)OutputMode.o \
$(OutDir_ide)Build.o \
$(OutDir_ide)Debug.o \
$(OutDir_ide)Valgrind.o \
$(OutDir_ide)Export.o \
$(OutDir_ide_Common)Common.a \
$(OutDir_ide_Core)Core.a \
$(OutDir_ide_LayDes)LayDes.a \
$(OutDir_ide_IconDes)IconDes.a \
$(OutDir_ide_Builders)Builders.a \
$(OutDir_ide_Debuggers)Debuggers.a \
$(OutDir_ide_Browser)Browser.a \
$(OutDir_CodeEditor)CodeEditor.a \
$(OutDir_CtrlLib)CtrlLib.a \
$(OutDir_plugin_bz2)bz2.a \
$(OutDir_HexView)HexView.a \
$(OutDir_art_BlueBar)BlueBar.a \
$(OutDir_plugin_astyle)astyle.a \
$(OutDir_usvn)usvn.a \
$(OutDir_TextDiffCtrl)TextDiffCtrl.a \
$(OutDir_TabBar)TabBar.a \
$(OutDir_ide_Designers)Designers.a \
$(OutDir_ide_Android)Android.a \
$(OutDir_ide_Java)Java.a \
$(OutDir_ide_MacroManager)MacroManager.a \
$(OutDir_ide_SrcUpdater)SrcUpdater.a \
$(OutDir_Esc)Esc.a \
$(OutDir_plugin_lzma)lzma.a \
$(OutDir_plugin_lz4)lz4.a \
$(OutDir_plugin_zstd)zstd.a \
$(OutDir_Core)Core.a \
$(OutDir_RichEdit)RichEdit.a \
$(OutDir_IconDes)IconDes.a \
$(OutDir_plugin_gif)gif.o \
$(OutDir_plugin_gif)gif.a \
$(OutDir_plugin_jpg)jpgreg.o \
$(OutDir_plugin_jpg)jpg.a \
$(OutDir_Painter)PainterInit.o \
$(OutDir_Painter)Painter.a \
$(OutDir_Draw)Draw.a \
$(OutDir_CppBase)CppBase.a \
$(OutDir_PdfDraw)PdfInit.o \
$(OutDir_PdfDraw)PdfDraw.a \
$(OutDir_plugin_pcre)pcre.a \
$(OutDir_CtrlCore)CtrlCore.a \
$(OutDir_plugin_bmp)BmpReg.o \
$(OutDir_plugin_bmp)bmp.a \
$(OutDir_RichText)RichText.a \
$(OutDir_plugin_png)pngreg.o \
$(OutDir_plugin_png)png.a
$(LINKER) -o "$(OutFile)" -Wl,-s $(LIBPATH) -Wl,-O,2 $(LDFLAGS) -Wl,--start-group \
$(OutDir_ide)BaseDlg.o \
$(OutDir_ide)SelectPkg.o \
$(OutDir_ide)UppWspc.o \
$(OutDir_ide)NewPackageFile.o \
$(OutDir_ide)UppDlg.o \
$(OutDir_ide)Template.o \
$(OutDir_ide)Console.o \
$(OutDir_ide)FindFile.o \
$(OutDir_ide)FindInFiles.o \
$(OutDir_ide)Config.o \
$(OutDir_ide)ide.o \
$(OutDir_ide)idefile.o \
$(OutDir_ide)EditorTabBar.o \
$(OutDir_ide)Bottom.o \
$(OutDir_ide)t.o \
$(OutDir_ide)Cpp.o \
$(OutDir_ide)Assist.o \
$(OutDir_ide)DCopy.o \
$(OutDir_ide)ContextGoto.o \
$(OutDir_ide)GoToLine.o \
$(OutDir_ide)Swaps.o \
$(OutDir_ide)ParamInfo.o \
$(OutDir_ide)Navigator.o \
$(OutDir_ide)Annotations.o \
$(OutDir_ide)Virtuals.o \
$(OutDir_ide)Thisbacks.o \
$(OutDir_ide)Jump.o \
$(OutDir_ide)Setup.o \
$(OutDir_ide)Custom.o \
$(OutDir_ide)Print.o \
$(OutDir_ide)Insert.o \
$(OutDir_ide)idetool.o \
$(OutDir_ide)Install.o \
$(OutDir_ide)Android.o \
$(OutDir_ide)idebar.o \
$(OutDir_ide)idewin.o \
$(OutDir_ide)About.o \
$(OutDir_ide)Help.o \
$(OutDir_ide)Macro.o \
$(OutDir_ide)OnlineSearch.o \
$(OutDir_ide)Errors.o \
$(OutDir_ide)Calc.o \
$(OutDir_ide)FormatCode.o \
$(OutDir_ide)Abbr.o \
$(OutDir_ide)Qtf.o \
$(OutDir_ide)Xml.o \
$(OutDir_ide)Json.o \
$(OutDir_ide)MacroManager.o \
$(OutDir_ide)Update.o \
$(OutDir_ide)MethodsCtrls.o \
$(OutDir_ide)Methods.o \
$(OutDir_ide)AutoSetup.o \
$(OutDir_ide)InstantSetup.o \
$(OutDir_ide)OutputMode.o \
$(OutDir_ide)Build.o \
$(OutDir_ide)Debug.o \
$(OutDir_ide)Valgrind.o \
$(OutDir_ide)Export.o \
$(OutDir_ide_Common)Common.a \
$(OutDir_ide_Core)Core.a \
$(OutDir_ide_LayDes)LayDes.a \
$(OutDir_ide_IconDes)IconDes.a \
$(OutDir_ide_Builders)Builders.a \
$(OutDir_ide_Debuggers)Debuggers.a \
$(OutDir_ide_Browser)Browser.a \
$(OutDir_CodeEditor)CodeEditor.a \
$(OutDir_CtrlLib)CtrlLib.a \
$(OutDir_plugin_bz2)bz2.a \
$(OutDir_HexView)HexView.a \
$(OutDir_art_BlueBar)BlueBar.a \
$(OutDir_plugin_astyle)astyle.a \
$(OutDir_usvn)usvn.a \
$(OutDir_TextDiffCtrl)TextDiffCtrl.a \
$(OutDir_TabBar)TabBar.a \
$(OutDir_ide_Designers)Designers.a \
$(OutDir_ide_Android)Android.a \
$(OutDir_ide_Java)Java.a \
$(OutDir_ide_MacroManager)MacroManager.a \
$(OutDir_ide_SrcUpdater)SrcUpdater.a \
$(OutDir_Esc)Esc.a \
$(OutDir_plugin_lzma)lzma.a \
$(OutDir_plugin_lz4)lz4.a \
$(OutDir_plugin_zstd)zstd.a \
$(OutDir_Core)Core.a \
$(OutDir_RichEdit)RichEdit.a \
$(OutDir_IconDes)IconDes.a \
$(OutDir_plugin_gif)gif.o \
$(OutDir_plugin_gif)gif.a \
$(OutDir_plugin_jpg)jpgreg.o \
$(OutDir_plugin_jpg)jpg.a \
$(OutDir_Painter)PainterInit.o \
$(OutDir_Painter)Painter.a \
$(OutDir_Draw)Draw.a \
$(OutDir_CppBase)CppBase.a \
$(OutDir_PdfDraw)PdfInit.o \
$(OutDir_PdfDraw)PdfDraw.a \
$(OutDir_plugin_pcre)pcre.a \
$(OutDir_CtrlCore)CtrlCore.a \
$(OutDir_plugin_bmp)BmpReg.o \
$(OutDir_plugin_bmp)bmp.a \
$(OutDir_RichText)RichText.a \
$(OutDir_plugin_png)pngreg.o \
$(OutDir_plugin_png)png.a \
-lbz2 \
-lpthread \
-ldl \
-lrt \
-lz \
-ldl \
-lfreetype \
-lfontconfig \
-lexpat \
-lgtk-x11-2.0 \
-lgdk-x11-2.0 \
-latk-1.0 \
-lgdk_pixbuf-2.0 \
-lm \
-lpangocairo-1.0 \
-lfontconfig \
-lXext \
-lXrender \
-lXinerama \
-lXi \
-lXrandr \
-lXcursor \
-lXfixes \
-lpango-1.0 \
-lcairo \
-lX11 \
-lgobject-2.0 \
-lgmodule-2.0 \
-lglib-2.0 \
-lX11 \
-lXrender \
-lXinerama \
-ldl \
-lXft \
-lnotify \
-lpng \ # Here is the change
-lgthread-2.0 -Wl,--end-group # with the new part here
$(OutDir_ide):
mkdir -p $(OutDir_ide)
# ...
I will not attach these files because they are partially generated by the pkg-config.
4. Run make again and it should compile without a problem.
-
Attachment: domake
(Size: 12.15KB, Downloaded 191 times)
Greetings
Daniel
[Updated on: Thu, 24 August 2017 08:41] Report message to a moderator
|
|
|
|
Re: Compilation error [message #48680 is a reply to message #48679] |
Thu, 24 August 2017 08:37 |
rafiwui
Messages: 105 Registered: June 2017 Location: Stuttgart, Germany
|
Experienced Member |
|
|
Intersting. My glib is version 2.28.8 according to yum.
glib2.x86_64 2.28.8-9.el6 @anaconda-CentOS-201703281317.x86_64/6.9
glib2-devel.x86_64 2.28.8-9.el6 @base
Does that mean that the source code should be updated to check on older versions as well?
Greetings
Daniel
[Updated on: Thu, 24 August 2017 08:38] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:19:09 CEST 2024
Total time taken to generate the page: 0.03816 seconds
|
|
|