Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
HYPHY_GTK compiliation problem (Read 6216 times)
John B
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
HYPHY_GTK compiliation problem
Dec 1st, 2008 at 10:32am
 
Compiling the GTK binary fails at the linking stage.  Any ideas what might be up or what's missing?  The non-GTK version compiled fine.
Thanks
John

Linux florence 2.6.26-rc9 #1 SMP Mon Jul 7 13:58:23 BST 2008 x86_64
gcc/g++ 4.3.2 (Debian 4.3.2-1)

sh gtk_build.sh MP
Linux
Checking for curl
Curl seems to be present
+---------------------------------------+
|Building a multi-threaded HYPHYKernelMP|
+---------------------------------------+
COMPILER=g++, gcc
COMPILER_FLAGS= -w -c -O3 -D INTPTR_TYPE=long -fsigned-char -fpermissive -I/usr/local/genetics/HYPHY_Source/GUI -I/usr/local/genetics/HYPHY_Source/Source -I/usr/local/genetics/HYPHY_Source/Source/SQLite -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1    -D GDK_PIXBUF_ENABLE_BACKEND -D __HYPHY_GTK__  -D __MP__
Building HYNetInterface.cpp
Complete
...
Building [everything else]cpp
Complete
Building preferences.cpp
Complete
Linking HYPHYMP_GTK
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lssl -lcrypto -lcurl -lm -lpthread
g++ -w -fsigned-char -o HYPHYMP_GTK objGTK_MP/HYBaseGUI.cpp.o objGTK_MP/HYButton.cpp.o objGTK_MP/HYButtonBar.cpp.o objGTK_MP/HYChartWindow.cpp.o objGTK_MP/HYCheckBox.cpp.o objGTK_MP/HYComponent.cpp.o objGTK_MP/HYConsoleWindow.cpp.o objGTK_MP/HYDBWindow.cpp.o objGTK_MP/HYDataPanel.cpp.o objGTK_MP/HYDialogDefs.cpp.o objGTK_MP/HYEventTypes.cpp.o objGTK_MP/HYGraphicPane.cpp.o objGTK_MP/HYLabel.cpp.o objGTK_MP/HYModelWindow.cpp.o objGTK_MP/HYNetInterface.cpp.o objGTK_MP/HYObjectInspector.cpp.o objGTK_MP/HYParameterTable.cpp.o objGTK_MP/HYPlatformBootsrapWindow.cpp.o objGTK_MP/HYPlatformButton.cpp.o objGTK_MP/HYPlatformButtonBar.cpp.o objGTK_MP/HYPlatformChartWindow.cpp.o objGTK_MP/HYPlatformCheckBox.cpp.o objGTK_MP/HYPlatformComponent.cpp.o objGTK_MP/HYPlatformConsoleWindow.cpp.o objGTK_MP/HYPlatformDBWindow.cpp.o objGTK_MP/HYPlatformDataPanel.cpp.o objGTK_MP/HYPlatformGWindow.cpp.o objGTK_MP/HYPlatformGraphicPane.cpp.o objGTK_MP/HYPlatformLabel.cpp.o objGTK_MP/HYPlatformModelWindow.cpp.o objGTK_MP/HYPlatformPWindow.cpp.o objGTK_MP/HYPlatformParameterTable.cpp.o objGTK_MP/HYPlatformPullDown.cpp.o objGTK_MP/HYPlatformSequencePane.cpp.o objGTK_MP/HYPlatformTWindow.cpp.o objGTK_MP/HYPlatformTable.cpp.o objGTK_MP/HYPlatformTextBox.cpp.o objGTK_MP/HYPlatformTreePanel.cpp.o objGTK_MP/HYPlatformUtils.cpp.o objGTK_MP/HYPlatformWindow.cpp.o objGTK_MP/HYPullDown.cpp.o objGTK_MP/HYSequencePanel.cpp.o objGTK_MP/HYSharedMain.cpp.o objGTK_MP/HYTable.cpp.o objGTK_MP/HYTextBox.cpp.o objGTK_MP/HYTreePanel.cpp.o objGTK_MP/HYWindow.cpp.o objGTK_MP/Net.cpp.o objGTK_MP/attach.c.o objGTK_MP/auth.c.o objGTK_MP/baseobj.cpp.o objGTK_MP/batchlan.cpp.o objGTK_MP/batchlan2.cpp.o objGTK_MP/bgm.cpp.o objGTK_MP/btree.c.o objGTK_MP/btree_rb.c.o objGTK_MP/build.c.o objGTK_MP/calcnode.cpp.o objGTK_MP/category.cpp.o objGTK_MP/copy.c.o objGTK_MP/delete.c.o objGTK_MP/error.cpp.o objGTK_MP/expr.c.o objGTK_MP/fisher_exact.cpp.o objGTK_MP/func.c.o objGTK_MP/hash.c.o objGTK_MP/hyphyunixutils.cpp.o objGTK_MP/insert.c.o objGTK_MP/likefunc.cpp.o objGTK_MP/list.cpp.o objGTK_MP/main-GTK.cxx.o objGTK_MP/main.c.o objGTK_MP/matrix.cpp.o objGTK_MP/nexus.cpp.o objGTK_MP/opcodes.c.o objGTK_MP/os.c.o objGTK_MP/pager.c.o objGTK_MP/parse.c.o objGTK_MP/parser.cpp.o objGTK_MP/parser2.cpp.o objGTK_MP/polynoml.cpp.o objGTK_MP/pragma.c.o objGTK_MP/preferences.cpp.o objGTK_MP/printf.c.o objGTK_MP/random.c.o objGTK_MP/regex.cpp.o objGTK_MP/scfg.cpp.o objGTK_MP/select.c.o objGTK_MP/sequence.cpp.o objGTK_MP/site.cpp.o objGTK_MP/strings.cpp.o objGTK_MP/table.c.o objGTK_MP/tokenize.c.o objGTK_MP/trigger.c.o objGTK_MP/update.c.o objGTK_MP/util.c.o objGTK_MP/vacuum.c.o objGTK_MP/vdbe.c.o objGTK_MP/where.c.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lssl -lcrypto -lcurl -lm -lpthread
objGTK_MP/HYPlatformChartWindow.cpp.o: In function `_HYChartWindow::_SetMenuBar()':
HYPlatformChartWindow.cpp:(.text+0x8a5): undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)'
objGTK_MP/HYPlatformChartWindow.cpp.o: In function `_HYDistributionChartWindow::_SetMenuBar()':
HYPlatformChartWindow.cpp:(.text+0xaed): undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)'
objGTK_MP/HYPlatformChartWindow.cpp.o:(.data+0x40): undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)'
objGTK_MP/HYPlatformChartWindow.cpp.o:(.data+0x70): undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)'
objGTK_MP/HYPlatformChartWindow.cpp.o:(.data+0xa0): undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)'
objGTK_MP/HYPlatformChartWindow.cpp.o:(.data+0x110): more undefined references to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*)' follow
collect2: ld returned 1 exit status
Finished
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #1 - Dec 2nd, 2008 at 8:14am
 
Dear John,

Try compiling the latest SVN-tree version of HYPHY for GTK - I am not sure why you see the error you are getting. Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login Login provides instructions for building from latest Source.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
John B
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
Re: HYPHY_GTK compiliation problem
Reply #2 - Dec 3rd, 2008 at 6:06am
 
Aha.  It might have been using the latest version, or updating nearly everything on the machine, but it was most probably using gcc-4.2/g++-4.2 instead of v4.3 that finally fixed this for me.
Thanks a lot,
John
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #3 - Dec 3rd, 2008 at 7:57pm
 
Dear John,

Glad you worked the issue out. I'll make sure the code compiles with the latest gcc (which has become progressively more stringent).

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Danny
YaBB Newbies
*
Offline



Posts: 31
Re: HYPHY_GTK compiliation problem
Reply #4 - Feb 5th, 2009 at 2:54pm
 
I had the same problem with gcc4.3.  The svn update didn't help.  I installed gcg4.2.4 from source, deleted all the .o files and it compiled with MP, and HYPHYMP_GTK brings up a window.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #5 - Feb 6th, 2009 at 1:03pm
 
Dear John,

Could you check the version of gtk on your system ( Code:
pkg-config --version gtk+-2.0 

)? I just compiled the latest SVN build without a problem using gcc4.3.2 and gtk 2.15 on CentOS Linux.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Danny
YaBB Newbies
*
Offline



Posts: 31
Re: HYPHY_GTK compiliation problem
Reply #6 - Feb 8th, 2009 at 10:27pm
 
I seem to have had the same problem as John.

pkg-config --version gtk+-2.0
0.23

rpm -q gtk2-devel
gtk2-devel-2.14.7-1.fc10.i386

rpm -q gtk2
gtk2-2.14.7-1.fc10.i386

rpm -q gcc
gcc-4.3.2-7.i386

I got the same undefined reference to `hyphy_menu_item_callback(void*, unsigned int, _GtkWidget*) errors with the svn update.  I was able to compile with gcc 4.2.
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #7 - Feb 9th, 2009 at 12:26pm
 
Dear Danny,

I will try to recreate the error and fix it if possible.
That's the joy of open source software -- correct versions mean everything.

Thanks for confirming the issue.

Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Peter Hayward
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 1
Re: HYPHY_GTK compiliation problem
Reply #8 - Apr 29th, 2009 at 7:27am
 
Hi guys,

I can confim that compiling with gcc-4.2 and g++-4.2 does the trick. Note that on (K)Ubuntu9.04, and probably 8.10, gcc-4.3 and g++-4.3 is the default.

For those that don't know how this works.

1) Install gcc-4.2 and g++-4.2
2) Change the gtk-build.sh variables:
COMPILER="g++-4.2";
COMPILERC="gcc-4.2";

Now the linking works.

FYI, with gcc/g++ you have a linking error if you see this message:

collect2: ld returned 1 exit status
Finished

Regards
Back to top
 

Peter Hayward&&&&MSc Student - Computer Science/Bioinformatics,&&Bioinformatics Group,&&Computer Science Division,&&Dept of Mathematical Sciences,&&Stellenbosch University
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #9 - Apr 29th, 2009 at 11:49am
 
Dear Peter,

I'll put gcc4.3 (and 4.4) on my cluster and check to see if the build breaks.

Thanks for posting the issue and the fix.

Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: HYPHY_GTK compiliation problem
Reply #10 - May 6th, 2009 at 2:04pm
 
Found and fixed the compilation bug.

SVN version 518 and above should build properly.

Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged