Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » Huge amount of linking errors [FreeBSD 7.1, GCC 4.3]
Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #20631] Sat, 28 March 2009 03:45 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

An attempt to compile U++ TheIDE under FreeBSD 7.1-STABLE failed with many linking errors. They appear for both Debug & Optimal modes, as well as Static or Shared libs options.

Does anyone have an idea how to avoid this?
Quote:

Linking...
/home/paul/upp/out/ide/GCC.Debug.Gui.Main.Nogtk/$blitz.o(.te xt+0x28d6): In function `sPid()':
: undefined reference to `__cxa_guard_acquire'
/home/paul/upp/out/ide/GCC.Debug.Gui.Main.Nogtk/$blitz.o(.te xt+0x28ff): In function `sPid()':
: undefined reference to `__cxa_guard_release'
/home/paul/upp/out/ide/GCC.Debug.Gui.Main.Nogtk/$blitz.o(.te xt+0x298d): In function `TemplateDlg::ActualTemplate()':
: undefined reference to `__cxa_guard_acquire'
...
...
...

[Updated on: Wed, 01 July 2009 17:54]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #20637 is a reply to message #20631] Sat, 28 March 2009 14:42 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

UPD: The same errors are with GCC 4.1.
Note: "Clean" FreeBSD installation, no packages magic was made.


SOLVED!: I should use g++ instead of gcc Very Happy Foolish mistake Rolling Eyes

[Updated on: Sat, 28 March 2009 16:10]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22295 is a reply to message #20637] Wed, 01 July 2009 16:50 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

U++ 2008.1 compiles and links successfully on FreeBSD 7.1. While latest SVN 1349 version fails to link with GCC 4.3 on FreeBSD 7.1 with these errors:
----- ide ( GUI MAIN GCC SHARED FREEBSD ) (34 / 34)
...
ide: 42 file(s) built in (4:29.45), 6415 msecs / file, duration = 270151 msecs
Linking...
/home/paul/upp/out/CtrlLib/GCC.Gui.Shared/CtrlLib.a(ScrollBar.o)(.text+0x86b): In function `Upp::SizeGrip::LeftDown(Upp::Point_<int>, unsigned int)':
: undefined reference to `XUngrabPointer'
/home/paul/upp/out/CtrlLib/GCC.Gui.Shared/CtrlLib.a(ScrollBar.o)(.text+0x8f5): In function `Upp::SizeGrip::LeftDown(Upp::Point_<int>, unsigned int)':
: undefined reference to `XSendEvent'
/home/paul/upp/out/CtrlLib/GCC.Gui.Shared/CtrlLib.a(MenuBar.o)(.text+0x4b6): In function `Upp::MenuBar::PopUp(Upp::Ctrl*, Upp::Point_<int>, Upp::Size_<i
	nt>)':
: undefined reference to `XSync'
/home/paul/upp/out/CtrlLib/GCC.Gui.Shared/CtrlLib.a(ChGtk.o)(.text+0x74): In function `Upp::GtkInt(_GtkWidget*, char const*)':
: undefined reference to `gtk_widget_style_get'
...
There were errors. (23:20.29)
Can anyone help?

[Updated on: Mon, 06 July 2009 12:42]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22296 is a reply to message #22295] Wed, 01 July 2009 19:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Looks like it does not link with xlib, for any reason...
Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22297 is a reply to message #22296] Wed, 01 July 2009 19:39 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

It is strange that 2008.1 version links perfectly while latest SVN has errors. I wonder if it is a way to localize the cause.

[Updated on: Wed, 01 July 2009 19:41]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22298 is a reply to message #22297] Thu, 02 July 2009 00:00 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

.

[Updated on: Mon, 06 July 2009 23:32]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22321 is a reply to message #22298] Fri, 03 July 2009 13:40 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

SOLVED!

Adding two libraries: gtk-x11-2.0 and Xft made linking perfect. A don`t really know why they where not included in U++ dependency libs - may be problem with names?..

[Updated on: Fri, 03 July 2009 13:41]

Report message to a moderator

icon9.gif  Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22344 is a reply to message #22321] Mon, 06 July 2009 10:44 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Still have problems with compiling latest SVN U++ under FreeBSD 7.1.
Now each GUI application doesn't start with error message:
Quote:

terminate called after throwing an instance of '__gnu_cxx::__concurrence_lock_error;
what(): __gnu_cxx::__concurrence_lock_error'

As far as I understand it has something to do with pthreads support. If anyone had this error, please help. Anyway, investigation continues.

UPDATE: this happens only in release mode (use shared libs).

[Updated on: Mon, 06 July 2009 14:37]

Report message to a moderator

icon14.gif  Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22345 is a reply to message #22344] Mon, 06 July 2009 19:07 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

OK, I`m here to post the latest investigation results for FreeBSD successful linkage. The libraries required (and which where absent in linkage list) where:
pthread for Core,
Xft gtk-x11-2.0 for Draw (tests shown these libs needed for both NOGTK and !NOGTK)

Then I`ve looked into these packages` settings and found these libraries, but the condition was BSD, not FREEBSD.
So here is what I propose.

Core:
[now] BSD -> pthread
[I propose] FREEBSD -> pthread
Or somehow set BSD instead of FREEBSD flag for FreeBSD OS.

Draw:
[now] (LINUX | BSD) & !NOGTK -> gtk-x11-2.0 ...
[I propose] LINUX | FREEBSD -> Xft gtk-x11-2.0 ...

And the quickest FreeBSD fix for the current TheIDE configuration is to add BSD flag into Build methods/Fixed flags for both Debug and Release.

[Updated on: Mon, 06 July 2009 22:46]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22419 is a reply to message #22345] Mon, 13 July 2009 11:29 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Pavel,

sorry that I didn't answer earlier, I was in vacations.

The BSD flag needed for newer SVN versions was added long time after 2008.1 release. That means if you compile SVN version with the 2008.1 version the first time you have to set BSD flag manually to get a good compilation run, because it is not set TheIDE-internally. Then after when you use the new compiled TheIDE version BSD flag is set automatically on FreeBSD, so everything should work concerning that. That was the problem you had.

I must admit, I didn't check lib dependencies once again after the transition to define platform in config.h for GTK bindings, so I will check that on my BSD platforms to see, what is really needed to fix that.

Matthias
Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22423 is a reply to message #22419] Mon, 13 July 2009 22:46 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Pavel,

for me it works with latest SVN version (1395), FreeBSD 7.2 (7 Stable), GCC 4.2.1.
Both compilation runs that I use (NOGTK & static linking or !NOGTK and dynamic linking) works here.

I think you had the problem I explained in my last post.

Matthias
Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22434 is a reply to message #22423] Wed, 15 July 2009 11:14 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Hi, Matthias!
I believe it is time to update FreeBSD port for U++, because of such a behaviour (FreeBSD <-> BSD). I consider it a good idea too because U++ is stable enough on latest SVNs.

[Updated on: Wed, 15 July 2009 11:14]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #22439 is a reply to message #22434] Wed, 15 July 2009 17:31 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Pavel,

you are right, one could also prepare something like an upp-dev port, but I do not think it is really worth the effort since normally you do not have trouble with updating from SVN and recompile TheIDE with the one installed via ports.

Of course if there is an important change that breaks building TheIDE one could think about preparing a port (which I would not submit to FreeBSD ports, but only put here in the forum).

On the other hand, this important change in building process was the first I had within ~2 years Smile.

Matthias
Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #24260 is a reply to message #22439] Thu, 07 January 2010 20:10 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I'm again experiencing problems linking applications under FreeBSD 7.1. I try to link "All static" version of GTK program and it gives huge amount of linking errors.
This is strange due to Shared version with GTK links flawlessly as well as All static version with NOGTK flag.

Can anyone please give me a clue what to do to make static GTK app?

P.S. These are linking errors:
Quote:

----- BNFEditor3 ( GUI MT BSD FREEBSD MAIN GCC POSIX BSD FREEBSD ) (11 / 11)
Linking...
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x484 ): In function `gtk_adjustment_class_intern_init'
:
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x49a ): In function `gtk_adjustment_class_intern_init'
:
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x50e ): In function `gtk_adjustment_class_intern_init'
:
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x524 ): In function `gtk_adjustment_class_intern_init'
:
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x598 ): In function `gtk_adjustment_class_intern_init'
:
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkadjustment.o)(.text+0x5ae ): more undefined references to `libintl_dgettext
' follow
/usr/local/lib/libgtk-x11-2.0.a(gtkimmulticontext.o)(.text+0 x1a1): In function `gtk_im_multicontext_append_me
nuitems':
: undefined reference to `libintl_bindtextdomain'
/usr/local/lib/libgtk-x11-2.0.a(gtkimmulticontext.o)(.text+0 x1bd): In function `gtk_im_multicontext_append_me
nuitems':
: undefined reference to `libintl_bind_textdomain_codeset'
/usr/local/lib/libgtk-x11-2.0.a(gtkimmulticontext.o)(.text+0 x1d8): In function `gtk_im_multicontext_append_me
nuitems':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkimmulticontext.o)(.text+0 x24a): In function `gtk_im_multicontext_append_me
nuitems':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkinvisible.o)(.text+0x3a4) : In function `gtk_invisible_class_intern_init':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkinvisible.o)(.text+0x3ba) : In function `gtk_invisible_class_intern_init':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtklabel.o)(.text+0x347a): In function `gtk_label_class_intern_init':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtklabel.o)(.text+0x3490): more undefined references to `libintl_dgettext' fo
llow
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x1726): In function `gettext_initialization':
: undefined reference to `libintl_bindtextdomain'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x173a): In function `gettext_initialization':
: undefined reference to `libintl_bindtextdomain'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x174e): In function `gettext_initialization':
: undefined reference to `libintl_bind_textdomain_codeset'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x1762): In function `gettext_initialization':
: undefined reference to `libintl_bind_textdomain_codeset'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x1860): In function `gtk_get_option_group':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x1876): In function `gtk_get_option_group':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkmain.o)(.text+0x1c75): In function `post_parse_hook':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkmenu.o)(.text+0x38be): In function `gtk_menu_class_intern_init':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkmenu.o)(.text+0x38d4): In function `gtk_menu_class_intern_init':
: undefined reference to `libintl_dgettext'
/usr/local/lib/libgtk-x11-2.0.a(gtkmenu.o)(.text+0x3920): more undefined references to `libintl_dgettext' fol
low

...

[Updated on: Thu, 07 January 2010 20:13]

Report message to a moderator

Re: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3] [message #24262 is a reply to message #24260] Thu, 07 January 2010 20:39 Go to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hello Pavel,

I do not see the point to link your app with GTK static library.
Normally these libs are not provided since lots of apps are using them. If you would link statically with GTK you would get a huge app size which IMHO is not desirable.

Matthias
Previous Topic: Problem installing upp on ubuntu
Next Topic: localized formating of double on linux
Goto Forum:
  


Current Time: Fri Nov 15 08:35:29 CET 2019

Total time taken to generate the page: 0.03639 seconds