Re: Issue: TORCS won't link libpng on Ubuntu 13.10

Bernhard Wymann <[email protected]> Tue, 03 Dec 2013 11:27:35 +0100
Newsgroups gmane.games.torcs.general
Organization wytec
Message-ID <[email protected]>
Hi Tom

Hm, no idea. What you can check if the symbol is available in the png 
libs, and what your default library is (usually there are multiple 
versions installed, e.g. 1.2 and 1.5):
cd /usr
find . -name "libpn*"
-> list of candidates
check with "nm -D path/libpng.so | grep create_info_struct" ("path" is 
meant as placeholder here)

Is the symbol defined there?

You could try to export as well "-Wl,--verbose" in CPPFLAGS, CXXFLAGS 
and CFLAGS, and rerun configure/make to see the linker output during the 
build.

Please report back when you have more information or a solution.

Kind regards

Bernhard

On 12/02/2013 11:39 PM, Toms Lēšmanis wrote:
> Hi,
>
> I have spent days trying to work out what causes this problem, but I
> haven't been successful. Hence, I am turning to you.
>
> I am trying to build TORCS 1.3.5. on Ubuntu 13.10, but I keep getting
> the errors "undefined reference to png_*":
>
> g++ main.o linuxspec.o
> -L/home/reinis/FYP_Surrey/TORCS_source/torcs-1.3.5/export/lib -lopenal
> -lalut -lvorbisfile -L/usr/lib -L/usr/local/lib -lracescreens
> -lrobottools -lclient -lconfscreens -ltgf -ltgfclient -ltxml -lplibul
> -lraceengine -lmusicplayer -llearning -lplibjs -lplibssgaux -lplibssg
> -lplibsm -lplibsl -lplibsg -lplibul -lglut -lGLU -lGL -lpng -lz -ldl
> -lXrandr -lXrender -lXxf86vm -lXmu -lXi -lXt -lSM -lICE -lXext -lX11 -lm
> -o torcs-bin
> /home/reinis/FYP_Surrey/TORCS_source/torcs-1.3.5/export/lib/libtgfclient.so:
> undefined reference to `png_get_valid'
> /home/reinis/FYP_Surrey/TORCS_source/torcs-1.3.5/export/lib/libtgfclient.so:
> undefined reference to `png_create_info_struct'
> ...
>
> The error suggests the linker can't find the actual library, but the
> configuration (./configure) did not complain and I have written an
> example program that uses these functions, which builds fine with the
> command "gcc png_test.o -o png_test -lpng"
>
> Has anyone experienced a similar issue and can provide a solution to it?
> Help will be much appreciated.
>
> Thanks,
> Tom
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Torcs-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/torcs-users
>


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Torcs-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-users