Opened 15 years ago

Closed 14 years ago

#19368 closed defect (fixed)

Universal Binary software which needs libcryptopp

Reported by: mirko.g@… Owned by: raphael-st (Raphael Straub)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: gianluca.toso@…
Port: libcryptopp

Description

Hi, I'm trying to compile (on Leopard) the Universal Binary version of some software which needs libcryptopp.

I installed all macports invoking +universal and added:

CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk" CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk"

to the ./config command.

The make fails every time with the same error that seems related to libcryptopp:

ld warning: in /opt/local/lib/libcryptopp.a, file is not of required architecture
Undefined symbols for architecture ppc:
  "CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long)", referenced from:
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomNumberGenerator::GenerateByte()", referenced from:
      GetRandomUint8()     in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "typeinfo for CryptoPP::RandomPool", referenced from:
      typeinfo for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "vtable for CryptoPP::RandomPool", referenced from:
      __ZTVN8CryptoPP10RandomPoolE$non_lazy_ptr in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomNumberGenerator::DiscardBytes(unsigned long)", referenced from:
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomPool::RandomPool()", referenced from:
      CryptoPP::AutoSeededRandomPool::AutoSeededRandomPool(bool, unsigned int)in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::AutoSeededRandomPool::Reseed(bool, unsigned int)", referenced from:
      CryptoPP::AutoSeededRandomPool::AutoSeededRandomPool(bool, unsigned int)in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomNumberGenerator::GenerateWord32(unsigned int, unsigned int)", referenced from:
      GetRandomUint16()     in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
      GetRandomUint32()     in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomNumberGenerator::GenerateBit()", referenced from:
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomPool::IncorporateEntropy(unsigned char const*, unsigned long)", referenced from:
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "CryptoPP::RandomNumberGenerator::GenerateBlock(unsigned char*, unsigned long)", referenced from:
      vtable for CryptoPP::AutoSeededRandomPoolin libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
  "vtable for CryptoPP::RandomNumberGenerator", referenced from:
      __ZTVN8CryptoPP21RandomNumberGeneratorE$non_lazy_ptr in libmuleappcommon.a(libmuleappcommon_a-RandomFunctions.o)
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/jk/jkuVsCmqF6m6MFrW-JuX3k+++TI/-Tmp-//cctQxSoF.out (No such file or directory)
make[3]: *** [amulegui] Error 1
make[3]: *** Waiting for unfinished jobs....
ld warning: in /opt/local/lib/libcryptopp.a, file is not of required architecture
Undefined symbols for architecture ppc:

then follows several rows until:

ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/jk/jkuVsCmqF6m6MFrW-JuX3k+++TI/-Tmp-//ccMLgXfR.out (No such file or directory)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I don't know if this problem is related either to the portfile or to the source config file...

Thanks...

Attachments (5)

libcryptopp.universal.patch (1.2 KB) - added by gianluca.toso@… 15 years ago.
libcryptopp.universal.intel.patch (1.1 KB) - added by gianluca.toso@… 15 years ago.
libcryptopp560_universal_intel.tar.gz (1.0 KB) - added by gianluca.toso@… 15 years ago.
Portfile-libcryptopp.diff (1.1 KB) - added by gianluca.toso@… 15 years ago.
patch-GNUmakefile (288 bytes) - added by gianluca.toso@… 15 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: libcryptopp removed
Port: libcryptopp added; libcryptopp-5.5.2 +universal removed

comment:2 Changed 15 years ago by jmroot (Joshua Root)

The libcryptopp port does not have a universal variant. We'll happily apply a patch if you figure out how to make it build universal.

comment:3 in reply to:  2 Changed 15 years ago by mirko.g@…

Replying to jmr@…:

The libcryptopp port does not have a universal variant. We'll happily apply a patch if you figure out how to make it build universal.

I was able to compile as universal (on Leopard) with: CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc -DCRYPTOPP_DISABLE_ASM" make

comment:4 in reply to:  2 ; Changed 15 years ago by gianluca.toso@…

I had the same problem. On Intel -DCRYPTOPP_DISABLE_ASM is not needed.

I successfully compiled it universal binary with this patchs. The first tested on Tiger PPC, the second on Leopard Intel.

Changed 15 years ago by gianluca.toso@…

Attachment: libcryptopp.universal.patch added

Changed 15 years ago by gianluca.toso@…

comment:5 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:6 in reply to:  4 Changed 15 years ago by gianluca.toso@…

The same GNUmakefile patch works fine with 5.6.0. I attach a tar with the new Portfile (Intel version) and the patch.

Changed 15 years ago by gianluca.toso@…

comment:7 Changed 15 years ago by gianluca.toso@…

Cc: gianluca.toso@… added

Cc Me!

comment:8 Changed 15 years ago by gianluca.toso@…

On Intel -DCRYPTOPP_DISABLE_ASM is not needed because auto added due to as version (1.38 on Leopard). So it's not a prolem add it and this fixes universal compilation on PPC too.

I repost all conforming to guide, please controll it and commit it asap. Please controll mirrors: www.mirrors.wiretapped.net seems dead and gd.tuwien.ac.at is at version 5.2.1.

Changed 15 years ago by gianluca.toso@…

Attachment: Portfile-libcryptopp.diff added

Changed 15 years ago by gianluca.toso@…

Attachment: patch-GNUmakefile added

comment:9 Changed 14 years ago by aquawicket@…

I've attempted for hours to patch libcryptopp so I can build a universal binary with no luck. I'm ripping my hair out. Can you commit the changes.

comment:10 Changed 14 years ago by raphael-st (Raphael Straub)

Keywords: haspatch added
Owner: changed from macports-tickets@… to raphael@…
Status: newassigned
Version: 1.7.1

comment:11 Changed 14 years ago by raphael-st (Raphael Straub)

Resolution: fixed
Status: assignedclosed

Fixed in r64597.

Note: See TracTickets for help on using tickets.