VDrift / vdrift

VDrift source code
http://vdrift.net/
GNU General Public License v3.0
355 stars 97 forks source link

compiling errors Slackware 14.1 #124

Closed MajorLunaC closed 10 years ago

MajorLunaC commented 10 years ago

I'm trying to compile on Slackware 14.1, gcc-4.8.2, but I get the following errors. The first one has a fix, but then the second error shows up.

*Error 1:

bash-4.2$ scons
scons: Reading SConscript files ...
Checking for C++ header file GL/gl.h... yes
Checking for C++ header file GL/glu.h... yes
Checking for C++ header file SDL/SDL.h... yes
Checking for C++ header file SDL/SDL_image.h... yes
Checking for C++ header file SDL/SDL_rotozoom.h... yes
Checking for C++ header file vorbis/vorbisfile.h... yes
Checking for C++ header file GL/glew.h... yes
Checking for C++ header file curl/curl.h... yes
Checking for C++ header file bullet/btBulletCollisionCommon.h... yes
Checking for C++ header file archive.h... yes
Checking for glDeleteSamplers(0, NULL) in C library GLEW... yes
scons: done reading SConscript files.
scons: Building targets ...
    CPP build/aabb.o
    CPP build/aabb_space_partitioning.o
    CPP build/ai/ai.o
    CPP build/ai/ai_car_experimental.o
    CPP build/ai/ai_car_standard.o
    CPP build/archiveutils.o
src/archiveutils.cpp: In function 'bool Decompress(const string&, const string&, std::ostream&, std::ostream&)':
src/archiveutils.cpp:34:2: warning: 'int archive_read_support_compression_all(archive*)' is deprecated (declared at /usr/include/archive.h:311) [-Wdeprecated-declarations]
  archive_read_support_compression_all(a);
  ^
src/archiveutils.cpp:34:40: warning: 'int archive_read_support_compression_all(archive*)' is deprecated (declared at /usr/include/archive.h:311) [-Wdeprecated-declarations]
  archive_read_support_compression_all(a);
                                        ^
src/archiveutils.cpp:76:6: warning: 'int archive_read_finish(archive*)' is deprecated (declared at /usr/include/archive.h:585) [-Wdeprecated-declarations]
  if (archive_read_finish(a) != ARCHIVE_OK)
      ^
src/archiveutils.cpp:76:27: warning: 'int archive_read_finish(archive*)' is deprecated (declared at /usr/include/archive.h:585) [-Wdeprecated-declarations]
  if (archive_read_finish(a) != ARCHIVE_OK)
                           ^
    CPP build/autoupdate.o
    CPP build/bezier.o
    CPP build/camera_chase.o
    CPP build/camera_free.o
    CPP build/camera_mount.o
    CPP build/camera_orbit.o
    CPP build/car.o
    CPP build/carcontrolmap_local.o
src/carcontrolmap_local.cpp: In static member function 'static std::map<std::basic_string<char>, int> CARCONTROLMAP_LOCAL::InitKeycodeStringMap()':
src/carcontrolmap_local.cpp:833:20: error: 'SDLK_KP_0' was not declared in this scope
  keycodes["KP0"] = SDLK_KP_0;
                    ^
src/carcontrolmap_local.cpp:834:20: error: 'SDLK_KP_1' was not declared in this scope
  keycodes["KP1"] = SDLK_KP_1;
                    ^
src/carcontrolmap_local.cpp:835:20: error: 'SDLK_KP_2' was not declared in this scope
  keycodes["KP2"] = SDLK_KP_2;
                    ^
src/carcontrolmap_local.cpp:836:20: error: 'SDLK_KP_3' was not declared in this scope
  keycodes["KP3"] = SDLK_KP_3;
                    ^
src/carcontrolmap_local.cpp:837:20: error: 'SDLK_KP_4' was not declared in this scope
  keycodes["KP4"] = SDLK_KP_4;
                    ^
src/carcontrolmap_local.cpp:838:20: error: 'SDLK_KP_5' was not declared in this scope
  keycodes["KP5"] = SDLK_KP_5;
                    ^
src/carcontrolmap_local.cpp:839:20: error: 'SDLK_KP_6' was not declared in this scope
  keycodes["KP6"] = SDLK_KP_6;
                    ^
src/carcontrolmap_local.cpp:840:20: error: 'SDLK_KP_7' was not declared in this scope
  keycodes["KP7"] = SDLK_KP_7;
                    ^
src/carcontrolmap_local.cpp:841:20: error: 'SDLK_KP_8' was not declared in this scope
  keycodes["KP8"] = SDLK_KP_8;
                    ^
src/carcontrolmap_local.cpp:842:20: error: 'SDLK_KP_9' was not declared in this scope
  keycodes["KP9"] = SDLK_KP_9;
                    ^
src/carcontrolmap_local.cpp:875:28: error: 'SDLK_APPLICATION' was not declared in this scope
  keycodes["APPLICATION"] = SDLK_APPLICATION;
                            ^
src/carcontrolmap_local.cpp:876:24: error: 'SDLK_NUMLOCKCLEAR' was not declared in this scope
  keycodes["NUMLOCK"] = SDLK_NUMLOCKCLEAR;
                        ^
src/carcontrolmap_local.cpp:878:27: error: 'SDLK_SCROLLLOCK' was not declared in this scope
  keycodes["SCROLLLOCK"] = SDLK_SCROLLLOCK;
                           ^
src/carcontrolmap_local.cpp:885:22: error: 'SDLK_RGUI' was not declared in this scope
  keycodes["RMETA"] = SDLK_RGUI;
                      ^
src/carcontrolmap_local.cpp:886:22: error: 'SDLK_LGUI' was not declared in this scope
  keycodes["LMETA"] = SDLK_LGUI;
                      ^
scons: *** [build/carcontrolmap_local.o] Error 1
scons: building terminated because of errors.
bash-4.2$

*The fix is listed: https://github.com/VDrift/vdrift/issues/110 However, even though the patch listed in that issue was applied successfully, I get another error that I don't see listed.

*Error 2

bash-4.2$ scons
scons: Reading SConscript files ...
Checking for C++ header file GL/gl.h... yes
Checking for C++ header file GL/glu.h... yes
Checking for C++ header file SDL/SDL.h... yes
Checking for C++ header file SDL/SDL_image.h... yes
Checking for C++ header file SDL/SDL_rotozoom.h... yes
Checking for C++ header file vorbis/vorbisfile.h... yes
Checking for C++ header file GL/glew.h... yes
Checking for C++ header file curl/curl.h... yes
Checking for C++ header file bullet/btBulletCollisionCommon.h... yes
Checking for C++ header file archive.h... yes
Checking for glDeleteSamplers(0, NULL) in C library GLEW... yes
scons: done reading SConscript files.
scons: Building targets ...
    CPP build/aabb.o
    CPP build/aabb_space_partitioning.o
    CPP build/ai/ai.o
    CPP build/ai/ai_car_experimental.o
    CPP build/ai/ai_car_standard.o
    CPP build/archiveutils.o
src/archiveutils.cpp: In function 'bool Decompress(const string&, const string&, std::ostream&, std::ostream&)':
src/archiveutils.cpp:34:2: warning: 'int archive_read_support_compression_all(archive*)' is deprecated (declared at /usr/include/archive.h:311) [-Wdeprecated-declarations]
  archive_read_support_compression_all(a);
  ^
src/archiveutils.cpp:34:40: warning: 'int archive_read_support_compression_all(archive*)' is deprecated (declared at /usr/include/archive.h:311) [-Wdeprecated-declarations]
  archive_read_support_compression_all(a);
                                        ^
src/archiveutils.cpp:76:6: warning: 'int archive_read_finish(archive*)' is deprecated (declared at /usr/include/archive.h:585) [-Wdeprecated-declarations]
  if (archive_read_finish(a) != ARCHIVE_OK)
      ^
src/archiveutils.cpp:76:27: warning: 'int archive_read_finish(archive*)' is deprecated (declared at /usr/include/archive.h:585) [-Wdeprecated-declarations]
  if (archive_read_finish(a) != ARCHIVE_OK)
                           ^
    CPP build/autoupdate.o
    CPP build/bezier.o
    CPP build/camera_chase.o
    CPP build/camera_free.o
    CPP build/camera_mount.o
    CPP build/camera_orbit.o
    CPP build/car.o
    CPP build/carcontrolmap_local.o
    CPP build/cardifferential.o
    CPP build/cardynamics.o
src/cardynamics.cpp: In static member function 'static bool CARDYNAMICS::WheelContactCallback(btManifoldPoint&, const btCollisionObject*, int, int, const btCollisionObject*, int, int)':
src/cardynamics.cpp:1807:77: error: 'const class btCollisionObject' has no member named 'getRootCollisionShape'
   const btCompoundShape* car = static_cast<const btCompoundShape*>(colObj0->getRootCollisionShape());
                                                                             ^
scons: *** [build/cardynamics.o] Error 1
scons: building terminated because of errors.
bash-4.2$
logzero commented 10 years ago

Hi MajorLunaC. What are your libarchive and bullet versions? Which vdrift revision are you trying to compile (not master I assume)?

MajorLunaC commented 10 years ago

VDrift-2012-07-22 Source Package for Linux (as listed on the downloads page "source (Linux et al) 2012-07-22"). Bullet Version: 2.82 in the bullet.pc file (Although the pull is bullet3-master) libarchive-3.1.2 gcc-4.8.2 *Slackware 14.1 (64-bit with 32-bit multilib support)

logzero commented 10 years ago

Thanks. I'll check the libs, seems that they have changed their API.

logzero commented 10 years ago

I've checked master against libarchive and bullet: libarchive 3.1.2 is supported since e2e9474 bullet 2.8.1 - 2.8.2 is supported since 870b6a4