Author Topic: Compile error  (Read 6144 times)

playerro

  • Member
  • **
  • Posts: 58
  • Karma: +0/-14
    • View Profile
Compile error
« on: April 26, 2014, 11:16:49 am »
Hello guys!
I need for your help. When I compile ghost (after installing all components that needed) in c~/ghost/ghost/ I do sudo make to compile it.
Using Ubuntu server. There are error:
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_mul_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init2'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_urandomm'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_add'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randinit_default'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_urandomb'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set_str'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_export'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_import'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_powm_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_sub'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randclear'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_powm'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randseed_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_mod'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_clear'
collect2: ld returned 1 exit status
make: *** [ghost++] Error 1
Help me please

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: Compile error
« Reply #1 on: April 26, 2014, 12:15:15 pm »
Add -lgmp to Makefile. I believe this was fixed in latest SVN at ghostplusplus.googlecode.com

playerro

  • Member
  • **
  • Posts: 58
  • Karma: +0/-14
    • View Profile
Re: Compile error
« Reply #2 on: April 27, 2014, 03:13:36 am »
In what place at this file I need to add this?

ping

  • Newbie
  • *
  • Posts: 41
  • Karma: +2/-1
    • View Profile
Re: Compile error
« Reply #3 on: April 27, 2014, 06:24:02 am »
Add it at the end of "LFLAGS" (7th line/first time "LFLAGS" is mentioned).

playerro

  • Member
  • **
  • Posts: 58
  • Karma: +0/-14
    • View Profile
Re: Compile error
« Reply #4 on: April 27, 2014, 10:55:51 am »
bnet.o: In function `CBNET::ProcessChatEvent(CIncomingChatEvent*)':
bnet.cpp:(.text+0xbda0): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xbde1): undefined reference to `boost::filesystem::path::stem() const'
bnet.cpp:(.text+0xc0fb): undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
bnet.cpp:(.text+0xc123): undefined reference to `boost::filesystem::path::extension() const'
bnet.cpp:(.text+0xc153): undefined reference to `boost::filesystem::path::compare(boost::filesystem::path const&) const'
bnet.cpp:(.text+0xc1db): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xc275): undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
bnet.cpp:(.text+0xc522): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xc863): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xd494): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xd4db): undefined reference to `boost::filesystem::path::stem() const'
bnet.cpp:(.text+0xd7f5): undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
bnet.cpp:(.text+0xd87c): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xdb27): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xdf60): undefined reference to `boost::filesystem::path::filename() const'
bnet.cpp:(.text+0xdff4): undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
bnet.o: In function `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::dispose()':
bnet.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impEE7disposeEv[boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::dispose()]+0x25): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
bnet.o: In function `boost::filesystem::exists(boost::filesystem::path const&)':
bnet.cpp:(.text._ZN5boost10filesystem6existsERKNS0_4pathE[boost::filesystem::exists(boost::filesystem::path const&)]+0x1b): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
bnet.o: In function `boost::filesystem::directory_iterator::directory_iterator(boost::filesystem::path const&)':
bnet.cpp:(.text._ZN5boost10filesystem18directory_iteratorC2ERKNS0_4pathE[_ZN5boost10filesystem18directory_iteratorC5ERKNS0_4pathE]+0xa0): undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
bnet.cpp:(.text._ZN5boost10filesystem18directory_iteratorC2ERKNS0_4pathE[_ZN5boost10filesystem18directory_iteratorC5ERKNS0_4pathE]+0x104): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
game_admin.o: In function `CAdminGame::EventPlayerBotCommand(CGamePlayer*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
game_admin.cpp:(.text+0x8635): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x8676): undefined reference to `boost::filesystem::path::stem() const'
game_admin.cpp:(.text+0x8900): undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
game_admin.cpp:(.text+0x8928): undefined reference to `boost::filesystem::path::extension() const'
game_admin.cpp:(.text+0x8958): undefined reference to `boost::filesystem::path::compare(boost::filesystem::path const&) const'
game_admin.cpp:(.text+0x89e0): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x8a6e): undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
game_admin.cpp:(.text+0x8c4b): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x8e7e): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x945e): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x949f): undefined reference to `boost::filesystem::path::stem() const'
game_admin.cpp:(.text+0x9939): undefined reference to `boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
game_admin.cpp:(.text+0x99ae): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0x9c65): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0xa049): undefined reference to `boost::filesystem::path::filename() const'
game_admin.cpp:(.text+0xa0d7): undefined reference to `boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
ghostdbmysql.o: In function `CGHostDBMySQL::CreateThread(CBaseCallable*)':
ghostdbmysql.cpp:(.text+0x149d2): undefined reference to `boost::thread::start_thread_noexcept()'
ghostdbmysql.cpp:(.text+0x14c4e): undefined reference to `boost::thread::start_thread_noexcept()'
collect2: ld returned 1 exit

More errors. Please help me.

ping

  • Newbie
  • *
  • Posts: 41
  • Karma: +2/-1
    • View Profile
Re: Compile error
« Reply #5 on: April 27, 2014, 05:08:08 pm »
What version of ghost and what version of boost are you using?

Grief-Code

  • Guest
Re: Compile error
« Reply #6 on: April 28, 2014, 12:36:15 am »
none version of boost :-D

boost is missing.

ping

  • Newbie
  • *
  • Posts: 41
  • Karma: +2/-1
    • View Profile
Re: Compile error
« Reply #7 on: April 28, 2014, 03:31:39 am »
Nah, I had a similar error to his. I had boost 1.52 installed (which gave this error). To fix, you need to install boost via apt-get:
Code: [Select]
apt-get install libboost-devThen recompile and it should work.

Edit: If he didn't have boost installed, then he wouldn't get the original error.
« Last Edit: April 28, 2014, 03:39:43 am by ping »

Grief-Code

  • Guest
Re: Compile error
« Reply #8 on: April 28, 2014, 04:26:39 am »
This doesnt must be the problem.
It could be also simply the missing link:
Code: [Select]
-lboost_filesystem -lboost_systemAnd it seems like, else he wouldnt have the problem before aswell on lgmp.

What version are you using as bot? its looking literally outdated.

playerro

  • Member
  • **
  • Posts: 58
  • Karma: +0/-14
    • View Profile
Re: Compile error
« Reply #9 on: April 28, 2014, 09:26:28 am »
I download it by this link: svn checkout http://ghostplusplus.googlecode.com/svn/trunk/ ./ghost
boost 1_47_0
What to do?

ping

  • Newbie
  • *
  • Posts: 41
  • Karma: +2/-1
    • View Profile
Re: Compile error
« Reply #10 on: April 28, 2014, 03:10:53 pm »
Alright, so you gotta delete/purge boost 1.47 from your system (google if you don't know how) and download a newer version (such as boost v1.52) and recompile everything.

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: Compile error
« Reply #11 on: April 28, 2014, 05:02:29 pm »
The latest SVN should work fine with anything > 1.46.

playerro

  • Member
  • **
  • Posts: 58
  • Karma: +0/-14
    • View Profile
Re: Compile error
« Reply #12 on: April 29, 2014, 12:32:28 pm »
ghostdbmysql.o: In function `CGHostDBMySQL::CreateThread(CBaseCallable*)':
ghostdbmysql.cpp:(.text+0x149d2): undefined reference to `boost::thread::start_thread_noexcept()'
ghostdbmysql.cpp:(.text+0x14c4e): undefined reference to `boost::thread::start_thread_noexcept()'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_mul_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init2'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_urandomm'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_add'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randinit_default'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_urandomb'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set_str'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_export'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_import'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_powm_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_sub'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_init_set_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randclear'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_powm'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmp_randseed_ui'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_mod'
../bncsutil/src/bncsutil//libbncsutil.so: undefined reference to `__gmpz_clear'
collect2: ld returned 1 exit status
make: *** [ghost++] Error 1

Installed 1_52_0 boost, not helped

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: Compile error
« Reply #13 on: April 29, 2014, 02:34:19 pm »
You still need -lgmp, make sure libgmp-dev installed

Grief-Code

  • Guest
Re: Compile error
« Reply #14 on: April 29, 2014, 03:41:55 pm »
When im reading the topic i have somehow a Déjà-vu  :D