Forums

Full Version: Compiling Error (Ubuntu 8.04)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

After I failed to use getdeb/playdeb to install VDrift, I tried to compile the source code. I used the tutorial in the wiki:
http://wiki.vdrift.net/Compiling
First I made sure all the dependencies are installed by:
Code:
sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev
Then I extracted the archive (source code of the last release - 2009-06-15), and when I tried to run scons (while in the vdrift folder of course) I got this error message:
Code:
scons: Reading SConscript files ...
Checking for C++ header file asio.hpp... (cached) yes
Checking for C++ header file boost/bind.hpp... (cached) yes
Checking for C++ header file GL/gl.h... (cached) yes
Checking for C++ header file GL/glu.h... (cached) yes
Checking for C++ header file SDL/SDL.h... (cached) yes
Checking for C++ header file SDL/SDL_image.h... (cached) yes
Checking for C++ header file SDL/SDL_rotozoom.h... (cached) yes
Checking for C++ header file vorbis/vorbisfile.h... (cached) yes
Checking for C++ header file GL/glew.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/httpget.o -c -Wall -Wextra -Wno-unused-parameter -pthread -g3 -march=athlon64 -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Ibullet -I/usr/include/SDL src/httpget.cpp
In file included from /usr/include/asio/impl/io_service.ipp:24,
                 from /usr/include/asio/io_service.hpp:498,
                 from /usr/include/asio/basic_io_object.hpp:20,
                 from /usr/include/asio/basic_socket.hpp:20,
                 from /usr/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/asio.hpp:18,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/epoll_reactor.hpp:29:59: error: boost/date_time/posix_time/posix_time_types.hpp: No such file or directory
In file included from /usr/include/asio.hpp:62,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/read_until.hpp:23:27: error: boost/regex.hpp: No such file or directory
In file included from /usr/include/asio/detail/timer_queue.hpp:32,
                 from /usr/include/asio/detail/epoll_reactor.hpp:46,
                 from /usr/include/asio/impl/io_service.ipp:24,
                 from /usr/include/asio/io_service.hpp:498,
                 from /usr/include/asio/basic_io_object.hpp:20,
                 from /usr/include/asio/basic_socket.hpp:20,
                 from /usr/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/asio.hpp:18,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/timer_queue_base.hpp:42: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/timer_queue_base.hpp:42: error: ‘time_duration’ declared as a ‘virtual’ field
/usr/include/asio/detail/timer_queue_base.hpp:42: error: expected ‘;’ before ‘wait_duration’
In file included from /usr/include/asio/detail/epoll_reactor.hpp:46,
                 from /usr/include/asio/impl/io_service.ipp:24,
                 from /usr/include/asio/io_service.hpp:498,
                 from /usr/include/asio/basic_io_object.hpp:20,
                 from /usr/include/asio/basic_socket.hpp:20,
                 from /usr/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/asio.hpp:18,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/timer_queue.hpp:100: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/timer_queue.hpp:100: error: ‘time_duration’ declared as a ‘virtual’ field
/usr/include/asio/detail/timer_queue.hpp:100: error: expected ‘;’ before ‘wait_duration’
/usr/include/asio/detail/timer_queue.hpp:107: error: expected `;' before ‘virtual’
In file included from /usr/include/asio/impl/io_service.ipp:24,
                 from /usr/include/asio/io_service.hpp:498,
                 from /usr/include/asio/basic_io_object.hpp:20,
                 from /usr/include/asio/basic_socket.hpp:20,
                 from /usr/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/asio.hpp:18,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/epoll_reactor.hpp: In member function ‘int asio::detail::epoll_reactor<Own_Thread>::get_timeout()’:
/usr/include/asio/detail/epoll_reactor.hpp:536: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/epoll_reactor.hpp:536: error: expected `;' before ‘minimum_wait_duration’
/usr/include/asio/detail/epoll_reactor.hpp:541: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/epoll_reactor.hpp:541: error: expected `;' before ‘wait_duration’
/usr/include/asio/detail/epoll_reactor.hpp:543: error: ‘wait_duration’ was not declared in this scope
/usr/include/asio/detail/epoll_reactor.hpp:543: error: ‘minimum_wait_duration’ was not declared in this scope
/usr/include/asio/detail/epoll_reactor.hpp:547: error: ‘minimum_wait_duration’ was not declared in this scope
/usr/include/asio/detail/epoll_reactor.hpp:547: error: ‘boost::posix_time’ has not been declared
In file included from /usr/include/asio/impl/io_service.ipp:26,
                 from /usr/include/asio/io_service.hpp:498,
                 from /usr/include/asio/basic_io_object.hpp:20,
                 from /usr/include/asio/basic_socket.hpp:20,
                 from /usr/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/include/asio.hpp:18,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/select_reactor.hpp: In member function ‘timeval* asio::detail::select_reactor<Own_Thread>::get_timeout(timeval&)’:
/usr/include/asio/detail/select_reactor.hpp:380: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/select_reactor.hpp:380: error: expected `;' before ‘minimum_wait_duration’
/usr/include/asio/detail/select_reactor.hpp:385: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/select_reactor.hpp:385: error: expected `;' before ‘wait_duration’
/usr/include/asio/detail/select_reactor.hpp:387: error: ‘wait_duration’ was not declared in this scope
/usr/include/asio/detail/select_reactor.hpp:387: error: ‘minimum_wait_duration’ was not declared in this scope
/usr/include/asio/detail/select_reactor.hpp:391: error: ‘minimum_wait_duration’ was not declared in this scope
/usr/include/asio/detail/select_reactor.hpp:391: error: ‘boost::posix_time’ has not been declared
In file included from /usr/include/asio/deadline_timer_service.hpp:26,
                 from /usr/include/asio/basic_deadline_timer.hpp:26,
                 from /usr/include/asio.hpp:19,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/time_traits.hpp: At global scope:
/usr/include/asio/time_traits.hpp:34: error: ‘posix_time’ is not a member of ‘boost’
/usr/include/asio/time_traits.hpp:34: error: ‘posix_time’ is not a member of ‘boost’
/usr/include/asio/time_traits.hpp:34: error: template argument 1 is invalid
In file included from /usr/include/asio/deadline_timer_service.hpp:27,
                 from /usr/include/asio/basic_deadline_timer.hpp:26,
                 from /usr/include/asio.hpp:19,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/detail/deadline_timer_service.hpp: In member function ‘void asio::detail::deadline_timer_service<Time_Traits, Timer_Scheduler>::wait(asio::detail::deadline_timer_service<Time_Traits, Timer_Scheduler>::implementation_type&, asio::error_code&)’:
/usr/include/asio/detail/deadline_timer_service.hpp:143: error: ‘boost::posix_time’ has not been declared
/usr/include/asio/detail/deadline_timer_service.hpp:143: error: expected `;' before ‘timeout’
/usr/include/asio/detail/deadline_timer_service.hpp:146: error: ‘timeout’ was not declared in this scope
In file included from /usr/include/asio.hpp:36,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/deadline_timer.hpp: At global scope:
/usr/include/asio/deadline_timer.hpp:31: error: ‘posix_time’ is not a member of ‘boost’
/usr/include/asio/deadline_timer.hpp:31: error: ‘posix_time’ is not a member of ‘boost’
/usr/include/asio/deadline_timer.hpp:31: error: template argument 1 is invalid
/usr/include/asio/deadline_timer.hpp:31: error: template argument 2 is invalid
/usr/include/asio/deadline_timer.hpp:31: error: template argument 3 is invalid
/usr/include/asio/deadline_timer.hpp:31: error: invalid type in declaration before ‘;’ token
In file included from /usr/include/asio.hpp:62,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/read_until.hpp:211: error: expected unqualified-id before ‘&’ token
/usr/include/asio/read_until.hpp:211: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/read_until.hpp:242: error: expected unqualified-id before ‘&’ token
/usr/include/asio/read_until.hpp:242: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/read_until.hpp:441: error: expected unqualified-id before ‘&’ token
/usr/include/asio/read_until.hpp:441: error: expected ‘,’ or ‘...’ before ‘&’ token
In file included from /usr/include/asio/read_until.hpp:448,
                 from /usr/include/asio.hpp:62,
                 from include/httpget.h:7,
                 from src/httpget.cpp:1:
/usr/include/asio/impl/read_until.ipp:196: error: expected unqualified-id before ‘&’ token
/usr/include/asio/impl/read_until.ipp:196: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/impl/read_until.ipp: In function ‘size_t asio::read_until(SyncReadStream&, asio::basic_streambuf<Allocator>&)’:
/usr/include/asio/impl/read_until.ipp:199: error: ‘expr’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp: At global scope:
/usr/include/asio/impl/read_until.ipp:206: error: expected unqualified-id before ‘&’ token
/usr/include/asio/impl/read_until.ipp:206: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/impl/read_until.ipp:207: error: redefinition of ‘template<class SyncReadStream, class Allocator> size_t asio::read_until(SyncReadStream&, asio::basic_streambuf<Allocator>&)’
/usr/include/asio/impl/read_until.ipp:196: error: ‘template<class SyncReadStream, class Allocator> size_t asio::read_until(SyncReadStream&, asio::basic_streambuf<Allocator>&)’ previously declared here
/usr/include/asio/impl/read_until.ipp: In function ‘size_t asio::read_until(SyncReadStream&, asio::basic_streambuf<Allocator>&)’:
/usr/include/asio/impl/read_until.ipp:222: error: ‘match_results’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:222: error: expected primary-expression before ‘>’ token
/usr/include/asio/impl/read_until.ipp:222: error: ‘match_results’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:223: error: ‘regex_search’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:223: error: ‘expr’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:224: error: ‘match_default’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:224: error: ‘match_partial’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:229: error: ‘ec’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:247: error: ‘ec’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:254: error: ‘ec’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp: At global scope:
/usr/include/asio/impl/read_until.ipp:583: error: expected unqualified-id before ‘&’ token
/usr/include/asio/impl/read_until.ipp:583: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/impl/read_until.ipp:657: error: ‘regex’ in namespace ‘boost’ does not name a type
/usr/include/asio/impl/read_until.ipp: In constructor ‘asio::detail::read_until_expr_handler<AsyncReadStream, Allocator, ReadHandler>::read_until_expr_handler(AsyncReadStream&, asio::basic_streambuf<Allocator>&)’:
/usr/include/asio/impl/read_until.ipp:587: error: class ‘asio::detail::read_until_expr_handler<AsyncReadStream, Allocator, ReadHandler>’ does not have any field named ‘expr_’
/usr/include/asio/impl/read_until.ipp:587: error: ‘expr’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:588: error: ‘next_search_start’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:589: error: ‘handler’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp: In member function ‘void asio::detail::read_until_expr_handler<AsyncReadStream, Allocator, ReadHandler>::operator()(const asio::error_code&, size_t)’:
/usr/include/asio/impl/read_until.ipp:617: error: ‘match_results’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:617: error: expected primary-expression before ‘>’ token
/usr/include/asio/impl/read_until.ipp:617: error: ‘match_results’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:618: error: ‘regex_search’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:618: error: ‘expr_’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:619: error: ‘match_default’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:619: error: ‘match_partial’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp: At global scope:
/usr/include/asio/impl/read_until.ipp:693: error: expected unqualified-id before ‘&’ token
/usr/include/asio/impl/read_until.ipp:693: error: expected ‘,’ or ‘...’ before ‘&’ token
/usr/include/asio/impl/read_until.ipp: In function ‘void asio::async_read_until(AsyncReadStream&, asio::basic_streambuf<Allocator>&)’:
/usr/include/asio/impl/read_until.ipp:707: error: ‘match_results’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:707: error: expected primary-expression before ‘>’ token
/usr/include/asio/impl/read_until.ipp:707: error: ‘match_results’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:708: error: ‘regex_search’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:708: error: ‘expr’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:709: error: ‘match_default’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:709: error: ‘match_partial’ is not a member of ‘boost’
/usr/include/asio/impl/read_until.ipp:716: error: ‘handler’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:734: error: ‘handler’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:743: error: ‘expr’ was not declared in this scope
/usr/include/asio/impl/read_until.ipp:743: error: ‘handler’ was not declared in this scope
In file included from src/httpget.cpp:1:
include/httpget.h: At global scope:
include/httpget.h:32: error: field ‘result_’ has incomplete type
include/httpget.h:34: error: field ‘error_output_’ has incomplete type
include/httpget.h: In member function ‘std::string httpget::Getter::GetError() const’:
include/httpget.h:48: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_resolve(const asio::error_code&, asio::ip::basic_resolver_iterator<asio::ip::tcp>)’:
src/httpget.cpp:114: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_connect(const asio::error_code&, asio::ip::basic_resolver_iterator<asio::ip::tcp>)’:
src/httpget.cpp:140: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_write_request(const asio::error_code&)’:
src/httpget.cpp:156: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_read_status_line(const asio::error_code&)’:
src/httpget.cpp:175: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp:181: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp:194: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_read_headers(const asio::error_code&)’:
src/httpget.cpp:214: error: ‘result_’ was not declared in this scope
src/httpget.cpp:224: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘void httpget::Getter::handle_read_content(const asio::error_code&)’:
src/httpget.cpp:234: error: ‘result_’ was not declared in this scope
src/httpget.cpp:244: error: ‘error_output_’ was not declared in this scope
src/httpget.cpp: In member function ‘std::string httpget::Getter::GetResult() const’:
src/httpget.cpp:264: error: ‘result_’ was not declared in this scope
scons: *** [build/httpget.o] Error 1
scons: building terminated because of errors.
Can you please help me figure out what went wrong?

Thanks!

P.S: If you know how I can get a deb package without getdeb/playdeb, that would also be great.
I think you are missing: libboost-date-time-dev and libboost-regex-dev
Great, now it compiles, thanks!

I installed it in my home folder, so that its path is /home/omri/share/games/vdrift/data . But how do I run it?
Hmmm, enter "vdrift" in your terminal.
Nothing seems to happen...
Code:
bash: vdrift: command not found
run: find / -name vdrift
I guess it is installed by default into: /usr/share/games/vdrift/bin/
Have a look here: http://vdrift.net/Forum/viewtopic.php?t=...36c827115d
I chose to install the game in my home folder (because I'm running out of space in the other partition), and the game is installed in:
/home/omri/share/games/vdrift
but how do I run it?
Sorry I should have been more explicit.
Vdrift consists of a data folder containing tracks, cars and other stuff and a executable binary. I guess you have a data folder in /home/omri/share/games/vdrift, right? But you are missing the vdrift binary to run the game. The binary is installed separated from the game data(sorry don't have linux here to check it).
If you want to run the game you have to locate your compiled/installed vdrift binary. To do this you could run the command "find / -name vdrift".
Thanks, it's in /home/omri/bin, now it works Smile