LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2005, 09:45 PM   #1
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
ld is "skipping incompatible" libraries


Hello. I am in the process of making my own little game. I started the project in Linux. My machine is a 64BIT AMD Optron, 2.2GZ, running FC3. Video card is geForce 6800GT. Anyhow, everything was going well. Then I moved my project to Windows XP, and did some dev' on that for a while (because I intend this to be OSI). All was going just fine, until I decided that I wanted to do some more dev in Linux. Allot of code has changed, but nothing I know of that would cause the error I am having. Everything compiles fine, but at linking, I get these messages:

Code:
g++ -g -O2 `sdl-config --cflags` `freetype-config --cflags` -Iinclude/ -I. -I/usr/include/python2.3/ -I/usr/local/include/python2.3/ -L/usr/lib -L/lib -L. -L/usr/lib/python2.3/config -L/usr/share/lib -L/usr/X11R6/lib -L/usr/local/lib -o coltest source/bind.o source/collisiontest.o source/command.o source/console.o source/engine.o source/exception.o source/font.o source/gmath.o source/gstring.o source/gui_arrowbutton.o source/gui_button.o source/gui.o source/gui_editbox.o source/gui_menu.o source/gui_packbox.o source/gui_scrollarea.o source/gui_scrollbar.o source/gui_window.o source/image.o source/input.o source/keyboard.o source/material.o source/materiallayer.o source/mouse.o source/object.o source/particle.osource/physics.o source/polygon.o source/py_gl.o source/script.o source/sound.osource/system.o source/transform.o source/video.o source/world.o -lm -lGLU -lGL`sdl-config --libs` `freetype-config --libs` -lSDL_image -lSDL_net -ldl -lpython2.3 -lutil -lzzip -logg -lvorbis -lvorbisfile -lopenal
/usr/bin/ld: skipping incompatible /usr/lib/libGLU.so when searching for -lGLU
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.so when searching for -lGLU
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.a when searching for -lGLU
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
My program is having lots of SEGVs, and I've been trying to track them down. I am really confused though, and think it all useless, because the problems lie in the functions that I wrote in Unix!! The only thing I can think of that has changed is that I used to have my project in KDevelop, now it is a custom makefile:

Code:
SOURCES =	source/bind.cpp \
			source/collisiontest.cpp \
			source/command.cpp \
			source/console.cpp \
			source/engine.cpp \
			source/exception.cpp \
			source/font.cpp \
			source/gmath.cpp \
			source/gstring.cpp \
			source/gui_arrowbutton.cpp \
			source/gui_button.cpp \
			source/gui.cpp \
			source/gui_editbox.cpp \
			source/gui_menu.cpp \
			source/gui_packbox.cpp \
			source/gui_scrollarea.cpp \
			source/gui_scrollbar.cpp \
			source/gui_window.cpp \
			source/image.cpp \
			source/input.cpp \
			source/keyboard.cpp \
			source/material.cpp \
			source/materiallayer.cpp \
			source/mouse.cpp \
			source/object.cpp \
			source/particle.cpp \
			source/physics.cpp \
			source/polygon.cpp \
			source/py_gl.cpp \
			source/script.cpp \
			source/sound.cpp \
			source/system.cpp \
			source/transform.cpp \
			source/video.cpp \
			source/world.cpp

OBJS    = ${SOURCES:.cpp=.o}
CFLAGS	= -g -O2 `sdl-config --cflags` `freetype-config --cflags` -Iinclude/ -I. -I/usr/include/python2.3/ -I/usr/local/include/python2.3/ -L/usr/lib -L/lib -L. -L/usr/lib/python2.3/config -L/usr/share/lib -L/usr/X11R6/lib -L/usr/local/lib
LIBS	= -lm -lGLU -lGL `sdl-config --libs` `freetype-config --libs` -lSDL_image -lSDL_net -ldl -lpython2.3 -lutil -lzzip -logg -lvorbis -lvorbisfile -lopenal
CC      = g++
PACKAGE = coltest

all : ${OBJS}
	${CC} ${CFLAGS} -o ${PACKAGE} ${OBJS} ${LIBS}

.cpp.o:
	${CC} ${CFLAGS} -c $< -o ${<:.cpp=.o}

clean :
	rm -f ${PACKAGE}
	rm -f ${OBJS}

install :
	./buildpak

# end of file
I would much appreciate any help offered. Thanks a ton in advance!
 
Old 09-12-2005, 12:30 PM   #2
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32
B.U.M.P.
 
Old 09-13-2005, 02:37 AM   #3
Harmaa Kettu
Member
 
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
Quote:
My program is having lots of SEGVs, and I've been trying to track them down. I am really confused though, and think it all useless, because the problems lie in the functions that I wrote in Unix!!
I assume you mean that your program works in Windows but segfaults in x86_64 Linux. This is probably a pointer size bug, you are storing pointer (64-bit) to int variable (32-bit) or something similar. Add the -Wall switch to your CFLAGS (you should call them CXXFLAGS since this is c++ code), recompile everything and look for messages about converting integers and pointers of different size.

The messages about incompatible libraries are harmless. The linker finds 32-bit libraries, but cannot use them with 64-bit code, so it prints a warning. It then continues searching and finds the correct libraries in /usr/lib64 and /usr/X11R6/lib64.
 
Old 09-13-2005, 11:34 PM   #4
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32
Thanks allot for the help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"...incompatible pointer type" Can it be ended? lyd Programming 3 07-29-2005 02:43 PM
curl "incompatible pointer type" while making PHP basse- Linux - Software 2 04-15-2004 10:21 AM
Linux boot hang : "init: error loading shared libraries" colinprice72 Linux - General 0 01-16-2004 09:04 AM
Gnu Parted: "incompatible feature enabled" linux@coxville Linux - Newbie 2 01-10-2004 06:30 PM
Intel USB Webcam & "missing shared libraries: libgd.so.1.8" leavingwindows Linux - Newbie 1 10-29-2003 02:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration