Bitcoin Forum
May 09, 2024, 04:11:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: MAC OS X 10.9 Mavericks / Compile Hints / ALL *COIND AFFECTED  (Read 2154 times)
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 10, 2014, 03:36:23 PM
Last edit: August 11, 2014, 02:03:21 AM by TheLittleDuke
 #1

[NOTE: This was originally posted to the Bitcoin thread but just got moved to ALTS because I have NOW included the ADDITIONAL X11 hash suite changes required to get them to compile on Mac OS X 10.9 Mavericks.]

Having a deuce of a time getting ANY *COIND to compile on Mac OS X

This is about as far as I get:

ld: warning: ignoring file leveldb/libleveldb.a, file was built for archive which is not the architecture being linked (x86_64): leveldb/libleveldb.a


I have gone into the sub dir and run make separately and it will produce .dylib versions

Have also tried this route (lots of errors building boost from source)

http://techspry.com/how-to/how-to-install-litecoind-bitcoind-dogecoind-on-os-x-10-9-mavericks/

Any hints or links would be appreciated!

-dvd

It's Better 2GIVE
https://2Give.Info
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
1715271103
Hero Member
*
Offline Offline

Posts: 1715271103

View Profile Personal Message (Offline)

Ignore
1715271103
Reply with quote  #2

1715271103
Report to moderator
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 10, 2014, 08:53:31 PM
 #2

I think I've fixed the leveldb problem by adding in "-arch x86_64" to the OPT line in the Makefile

OPT ?= -O2 -DNDEBUG -arch x86_64         # (A) Production use (optimized mode)

Now to deal with what looks like a problem finding BOOST

It's Better 2GIVE
https://2Give.Info
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 11, 2014, 01:17:18 AM
 #3

also need to do make this script executable if pulling from GIT

chmod 755 build_detect_platform

prior to running make -f makefile.osx

if you get link errors then

cd leveldb
make clean
cd ..
make -f makefile.osx

that will rebuild the level db correctly

It's Better 2GIVE
https://2Give.Info
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 11, 2014, 01:41:55 AM
 #4

What a PITA this was!  For all of the following X11 hash functions:

bmw.c      echo.c      jh.c      luffa.c      simd.c
blake.c      cubehash.c   groestl.c   keccak.c   shavite.c   skein.c

I had to run in and put in explicit typecasts in front of a boatload of calls -- converted (void *) into the very specific type structures expected.  

EXAMPLE:

   blake32_init(cc, IV224, salt_zero_small);

INTO

   blake32_init((sph_blake_small_context *) cc, IV224, salt_zero_small);

-dvd

It's Better 2GIVE
https://2Give.Info
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 11, 2014, 02:20:32 AM
 #5

So close...

I'm having linking issues and it affects both LITECOIND & GIVECOIND for 64bit on Mac OS X 10.9

Here's the error for LITECOIND:

Undefined symbols for architecture x86_64:
  "boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type, boost::system::error_code*)", referenced from:
      boost::filesystem::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type) in walletdb.o
  "boost::program_options::to_internal(std::string const&)", referenced from:
      boost::program_options::detail::basic_config_file_iterator<char>::getline(std::string&) in util.o
  "boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)", referenced from:
      boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool) in util.o
  "Db::verify(char const*, char const*, std::ostream*, unsigned int)", referenced from:
      CDBEnv::Verify(std::string, bool (*)(CDBEnv&, std::string)) in db.o
      CDBEnv::Salvage(std::string, bool, std::vector<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > >, std::allocator<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > > > >&) in db.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [litecoind] Error 1

AND THE ERROR FOR GIVECOIND:

Undefined symbols for architecture x86_64:
  "boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type, boost::system::error_code*)", referenced from:
      boost::filesystem::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option::enum_type) in walletdb.o
  "boost::program_options::to_internal(std::string const&)", referenced from:
      boost::program_options::detail::basic_config_file_iterator<char>::getline(std::string&) in util.o
  "boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)", referenced from:
      boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool) in util.o
  "Db::verify(char const*, char const*, std::ostream*, unsigned int)", referenced from:
      CDBEnv::Verify(std::string, bool (*)(CDBEnv&, std::string)) in db.o
      CDBEnv::Salvage(std::string, bool, std::vector<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > >, std::allocator<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > > > >&) in db.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Givecoind] Error 1

You can see that the 'file' command is showing that the boost library was built to x86_64

% file /usr/local/lib/libboost_filesystem-mt.dylib
/usr/local/lib/libboost_filesystem-mt.dylib: Mach-O 64-bit dynamically linked shared library x86_64

It's Better 2GIVE
https://2Give.Info
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
August 11, 2014, 06:24:30 PM
 #6

What I've found is that if you install Boost via Brew or MacPorts you're likely going to have issues.

Apple's new compiler and linking tools is having fits with code compiled by the GCC system from what I can tell.

I've started rebuilding Boost from source and have been able to eliminate "boost::filesystem" link errors.  

Still wrestling with the program_options library for some reason.

It's Better 2GIVE
https://2Give.Info
cryptowest
Sr. Member
****
Offline Offline

Activity: 437
Merit: 250


View Profile
September 22, 2014, 08:43:28 AM
 #7

Thanks for this info. Have you had any luck getting the x11 coins compiled?

johnnyrocket
Full Member
***
Offline Offline

Activity: 123
Merit: 104


View Profile
September 22, 2014, 09:01:45 AM
 #8

What I've found is that if you install Boost via Brew or MacPorts you're likely going to have issues.

Apple's new compiler and linking tools is having fits with code compiled by the GCC system from what I can tell.

I've started rebuilding Boost from source and have been able to eliminate "boost::filesystem" link errors.  

Still wrestling with the program_options library for some reason.

Building your own libraries is definitely a key step in setting up a compiler environment for both OS X and Windows (especially Boost). As far as the undefined symbols for x86_64 errors go, are you sure that the file you're checking is the one that's actually being linked?
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
September 22, 2014, 01:40:59 PM
 #9

Thanks for this info. Have you had any luck getting the x11 coins compiled?

Nothing on native 10.9

Though we did clean up a bunch of X11 related code that was missing function call typedefs Tongue

The solution was acquiring a 32-bit iMac and loading 10.6.8 on it -- that's how were able to build any and all wallets ATM.

-dvd

It's Better 2GIVE
https://2Give.Info
TheLittleDuke (OP)
Legendary
*
Offline Offline

Activity: 1024
Merit: 1004



View Profile WWW
September 22, 2014, 01:42:09 PM
 #10

What I've found is that if you install Boost via Brew or MacPorts you're likely going to have issues.

Apple's new compiler and linking tools is having fits with code compiled by the GCC system from what I can tell.

I've started rebuilding Boost from source and have been able to eliminate "boost::filesystem" link errors.  

Still wrestling with the program_options library for some reason.

Building your own libraries is definitely a key step in setting up a compiler environment for both OS X and Windows (especially Boost). As far as the undefined symbols for x86_64 errors go, are you sure that the file you're checking is the one that's actually being linked?

Totally agree here -- just wait until you get to packaging up a wallet for release ;-)

Oh the fun you'll have fixing and patching up the dylibs you will need to bundle with it

-dvd

It's Better 2GIVE
https://2Give.Info
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!