Linking ossxmix with gcc version 4.6.1

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Linking ossxmix with gcc version 4.6.1

Postby seawright » Thu Oct 27, 2011 11:01 pm

I was alarmed to receive over 500 lines of errors of the form:
Code: Select all
./gtkvu.o: In function `gtk_vu_class_init':
gtkvu.c:(.text+0x3e): undefined reference to `gtk_widget_get_type'
gtkvu.c:(.text+0x48): undefined reference to `gtk_type_class'
gtkvu.c:(.text+0x54): undefined reference to `g_type_check_class_cast'
./gtkvu.o: In function `gtk_vu_get_type':
gtkvu.c:(.text+0xe8): undefined reference to `gtk_widget_get_type'
gtkvu.c:(.text+0xf8): undefined reference to `gtk_type_unique'
./gtkvu.o: In function `gtk_vu_size_allocate':
when attempting to recompile ossxmix after upgrading to the latest version of Ubuntu which uses gcc version 4.6.1.

In case anyone else has had this problem I am enclosing a patch showing the change I made to the Makefile to resolve the problem and allow a clean compile.
Code: Select all
--- Makefile   2011-10-27 23:30:00.000000000 +0100
+++ Makefile.bak   2011-10-27 23:35:56.000000000 +0100
@@ -33,7 +33,7 @@
ossxmix:   $(BINDIR)/ossxmix

$(BINDIR)/ossxmix:   $(OBJECTS)
-   $(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(BINDIR)/ossxmix $(OBJECTS)
+   $(CC) -o $(BINDIR)/ossxmix $(OBJECTS) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s


$(TMPDIR)/gtkvu.o:   gtkvu.c
regards
Clive
seawright
Member
 
Posts: 88
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Linking ossxmix with gcc version 4.6.1

Postby cesium » Mon Oct 31, 2011 6:06 pm

The makefile is automatically generated, so patching it can be done only after running the configure step. The makefile generation could be patched, but this error is odd.
It seems all you're doing is rearranging the line? Also, I don't see an error with gcc v4.6.2 on debian... Can you check whether this still happens? Maybe something else happened to get fixed meanwhile and the patch is unneeded? (Also, long time no see. Hi, seawright!).

[Edit: greenvorbisfan's error reminds me of this, albait he had it on ossmixd. Hmm...]
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Linking ossxmix with gcc version 4.6.1

Postby seawright » Tue Nov 01, 2011 12:16 pm

With the latest sources from hg, ossxmix linking is clean however I note that the linking command has now become:
Code: Select all
cc -O `pkg-config gtk+-2.0 --cflags` -s -o ../../target/bin/ossxmix ./gtkvu.o ./ossxmix.o  `pkg-config gtk+-2.0 --libs`
moving `pkg-config gtk+-2.0 --libs` before the output file naming option ( -o ) still produces the same errors.
regards
Clive
seawright
Member
 
Posts: 88
Joined: Sat Jan 06, 2007 9:10 pm
Location: Hampshire UK

Re: Linking ossxmix with gcc version 4.6.1

Postby dev » Tue Nov 01, 2011 8:11 pm

cesium wrote:The makefile is automatically generated, so patching it can be done only after running the configure step. The makefile generation could be patched, but this error is odd.
It seems all you're doing is rearranging the line? Also, I don't see an error with gcc v4.6.2 on debian... Can you check whether this still happens? Maybe something else happened to get fixed meanwhile and the patch is unneeded? (Also, long time no see. Hi, seawright!).

[Edit: greenvorbisfan's error reminds me of this, albait he had it on ossmixd. Hmm...]



Hi,


$(LIBRARIES) $(LDFLAGS) has been now added after $(OBJECTS) in the latest sources.

Please resynch the hg sources with build 2006. Binaries will be released next week.



regards
dev
dev
Developer
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron