Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to make in vtorcs #56

Open
AliBaheri opened this issue Sep 27, 2018 · 9 comments
Open

Not able to make in vtorcs #56

AliBaheri opened this issue Sep 27, 2018 · 9 comments

Comments

@AliBaheri
Copy link

AliBaheri commented Sep 27, 2018

In Ubunto 18, when I run ./configure everything goes smoothly. But when I command "make"
I am facing with the following error. Could you please help me?

make TORCS_BASE=/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color MAKE_DEFAULT=/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/Make-default.mk make[1]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color' make[2]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/interfaces' Exporting car.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/car.h Exporting graphic.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/graphic.h Exporting js.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/js.h Exporting playerpref.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/playerpref.h Exporting raceman.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/raceman.h Exporting replay.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/replay.h Exporting robot.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/robot.h Exporting simu.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/simu.h Exporting telemetry.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/telemetry.h Exporting track.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/track.h make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/interfaces' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml' Exporting xml.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/xml.h Exporting xmlparse.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/xmlparse.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/tgf' Exporting tgf.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tgf.h Exporting os.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/os.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/tgf' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/tgfclient' Exporting tgfclient.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tgfclient.h Exporting screen_properties.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/screen_properties.h Exporting glfeatures.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/glfeatures.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/tgfclient' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/client' Exporting client.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/client.h Exporting exitmenu.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/exitmenu.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/client' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/confscreens' Exporting confscreens.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/confscreens.h Exporting driverconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/driverconfig.h Exporting joystickconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/joystickconfig.h Exporting mouseconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/mouseconfig.h Exporting controlconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/controlconfig.h Exporting graphconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/graphconfig.h Exporting simuconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/simuconfig.h Exporting soundconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/soundconfig.h Exporting openglconfig.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/openglconfig.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/confscreens' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/racescreens' Exporting racescreens.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/racescreens.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/racescreens' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/robottools' Exporting robottools.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/robottools.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/robottools' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/raceengineclient' Exporting singleplayer.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/singleplayer.h Exporting raceinit.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/raceinit.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/raceengineclient' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/learning' Exporting policy.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/policy.h Exporting ann_policy.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/ann_policy.h Exporting ANN.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/ANN.h Exporting learn_debug.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/learn_debug.h Exporting real.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/real.h Exporting string_utils.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/string_utils.h Exporting List.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/List.h Exporting MathFunctions.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/MathFunctions.h Exporting Distribution.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/learning/Distribution.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/learning' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/portability' Exporting portability.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/portability.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/portability' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/math' Exporting linalg_t.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tmath/linalg_t.h Exporting v2_t.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tmath/v2_t.h Exporting v3_t.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tmath/v3_t.h Exporting v4_t.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tmath/v4_t.h Exporting straight2_t.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/tmath/straight2_t.h make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/math' make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/linux' Exporting osspec.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/osspec.h make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/linux' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu' make[5]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2' make[6]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0' make[7]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include' make[8]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include/3D' Exporting Basic.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Basic.h Exporting Matrix.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Matrix.h Exporting Point.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Point.h Exporting Quaternion.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Quaternion.h Exporting Tuple3.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Tuple3.h Exporting Tuple4.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Tuple4.h Exporting Vector.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/3D/Vector.h make[8]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include/3D' make[8]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include/SOLID' Exporting solid.h to /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/export/include/SOLID/solid.h make[8]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include/SOLID' make[7]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0/include' make[6]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2/SOLID-2.0' make[5]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu/simuv2' make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules/simu' make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/modules' make[2]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' make[2]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml' make[5]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml/gennmtab' make[5]: Nothing to be done for 'tools'. make[5]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml/gennmtab' make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/txml' make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/accc' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/accc' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/nfs2ac' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/nfs2ac' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/nfsperf' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/nfsperf' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/package' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/package' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/texmapper' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/texmapper' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/trackgen' make[4]: Nothing to be done for 'tools'. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools/trackgen' make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/tools' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/linux' make[3]: Nothing to be done for 'tools'. make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/linux' make[2]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' make[2]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' make[3]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' make[4]: Entering directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/confscreens' make[4]: *** No rule to make target '/home/abaheri/Desktop/gym_torcs-master/gym_torcs-master/vtorcs-RL-color/export/include/tgfclient.h', needed by 'controlconfig.o'. Stop. make[4]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs/confscreens' /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/Make-default.mk:679: recipe for target 'subdirs' failed make[3]: *** [subdirs] Error 1 make[3]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src/libs' /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/Make-default.mk:679: recipe for target 'subdirs' failed make[2]: *** [subdirs] Error 1 make[2]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/src' /home/abaheri/Desktop/gym_torcs/vtorcs-RL-color/Make-default.mk:679: recipe for target 'subdirs' failed make[1]: *** [subdirs] Error 1 make[1]: Leaving directory '/home/abaheri/Desktop/gym_torcs/vtorcs-RL-color' Makefile:30: recipe for target 'restart' failed make: *** [restart] Error 2``

@layely
Copy link

layely commented Feb 17, 2019

Same here. @AliBaheri were you able to solve this. If yes, how, please?
I am running Ubuntu 18.04.

@ThePancakerizer
Copy link

Same here on Ubuntu 18.10

@W-yk
Copy link

W-yk commented May 9, 2019

Make-default.mk:240: recipe for target 'geometry.o' failed
on Ubuntu 18.10

@Jaeuk-Shin
Copy link

Same here on Ubuntu 18.04. Is it version mismatch error?

@frknayk
Copy link

frknayk commented Jul 13, 2019

Same here Ubuntu 16.04 !

@deltaflyer
Copy link

Here are all patches that I applied to vtorcs to make it compile on Ubuntu 18.04.

Resolving the isnan issue:

+++ b/src/drivers/olethros/geometry.cpp
@@ -370,7 +370,7 @@ void EstimateSphere (std::vector<Vector> P, ParametricSphere* sphere)
                                }
                                delta_total += delta;
                        }
-                       if (isnan(r)) {
+                       if (std::isnan(r)) {
                                for (i=0; i<d; i++) {
                                        center[i] =  ((*(sphere->C))[i] - mean[i]) / scale;
                                }

Fix for resolving the compatibility with Ubuntu's 18.04 libpng version:

@@ -98,7 +98,8 @@ GfImgReadPng(const char *filename, int *widthp, int *heightp, float screen_gamma
                return (unsigned char *)NULL;
        }
        
-       if (setjmp(png_ptr->jmpbuf))
+       //if (setjmp(png_ptr->jmpbuf))
+       if (setjmp(png_jmpbuf(png_ptr)))
        {
                /* Free all of the memory associated with the png_ptr and info_ptr */
                png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
@@ -229,7 +230,8 @@ GfImgWritePng(unsigned char *img, const char *filename, int width, int height)
                return -1;
        }
        
-       if (setjmp(png_ptr->jmpbuf)) {    
+       //if (setjmp(png_ptr->jmpbuf)) {
+       if (setjmp(png_jmpbuf(png_ptr))) {
                png_destroy_write_struct(&png_ptr, &info_ptr);
                fclose(fp);
                return -1;

Make sure, you have the right packages installed:

 sudo apt-get install libglib2.0-dev  libgl1-mesa-dev libglu1-mesa-dev  freeglut3-dev  libplib-dev  libopenal-dev libalut-dev libxi-dev libxmu-dev libxrender-dev  libxrandr-dev libpng-dev

Afterwards compile like this:

export CFLAGS="-fPIC"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
configure
make clean
make install
make datainstall

@root999
Copy link

root999 commented Feb 12, 2020

Here are all patches that I applied to vtorcs to make it compile on Ubuntu 18.04.

Resolving the isnan issue:

+++ b/src/drivers/olethros/geometry.cpp
@@ -370,7 +370,7 @@ void EstimateSphere (std::vector<Vector> P, ParametricSphere* sphere)
                                }
                                delta_total += delta;
                        }
-                       if (isnan(r)) {
+                       if (std::isnan(r)) {
                                for (i=0; i<d; i++) {
                                        center[i] =  ((*(sphere->C))[i] - mean[i]) / scale;
                                }

Fix for resolving the compatibility with Ubuntu's 18.04 libpng version:

@@ -98,7 +98,8 @@ GfImgReadPng(const char *filename, int *widthp, int *heightp, float screen_gamma
                return (unsigned char *)NULL;
        }
        
-       if (setjmp(png_ptr->jmpbuf))
+       //if (setjmp(png_ptr->jmpbuf))
+       if (setjmp(png_jmpbuf(png_ptr)))
        {
                /* Free all of the memory associated with the png_ptr and info_ptr */
                png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
@@ -229,7 +230,8 @@ GfImgWritePng(unsigned char *img, const char *filename, int width, int height)
                return -1;
        }
        
-       if (setjmp(png_ptr->jmpbuf)) {    
+       //if (setjmp(png_ptr->jmpbuf)) {
+       if (setjmp(png_jmpbuf(png_ptr))) {
                png_destroy_write_struct(&png_ptr, &info_ptr);
                fclose(fp);
                return -1;

Make sure, you have the right packages installed:

 sudo apt-get install libglib2.0-dev  libgl1-mesa-dev libglu1-mesa-dev  freeglut3-dev  libplib-dev  libopenal-dev libalut-dev libxi-dev libxmu-dev libxrender-dev  libxrandr-dev libpng-dev

Afterwards compile like this:

export CFLAGS="-fPIC"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS
configure
make clean
make install
make datainstall

Hey, I just issued with same problem but I honestly cant found where this GfImgReadPng() function is ? can you help me about that ?
Thanks a lot

@sprakashdash
Copy link

@root999 Going through a repo search you can find it at:
gym_torcs/vtorcs-RL-color/src/libs/tgfclient/img.cpp

@yanpanlau
Copy link

yanpanlau commented Aug 1, 2020

Ubuntu 18.04 is using g++ 7.50 where the original code need to compile under g++ 5.xx. See the following post how to compile using g++ 5.0.

https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants