Bennu on Linux PPC

Started by aggaz, July 30, 2011, 11:37:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aggaz

Hello, I use Debian on an iBookG4 (PPC architecture) and I would like to compile Bennugd on it.
Unfortunately I have some problems with some crypto-releted stuff.

If I go to core directory and type:
./configure
make


After some verbosity I get:
b_crypt.o: In function `crypt_create':
source/bennugd/core/bgdc/src/../../common/b_crypt.c:60: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:61: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:62: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:50: undefined reference to `DES_key_sched'
b_crypt.o: In function `crypt_data':
source/bennugd/core/bgdc/src/../../common/b_crypt.c:115: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:113: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:114: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:115: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:125: undefined reference to `DES_ecb_encrypt'
b_crypt.o:source/bennugd/core/bgdc/src/../../common/b_crypt.c:126: more undefined references to `DES_ecb_encrypt' follow
collect2: ld returned 1 exit status


Maybe it is worth to say that I get des.h from libssl-dev package:
/usr/include/openssl/des.h

I hope that someone can help me to solve this. If you don't see any solution, I would appreciate a suggestion on how to compile Bennugd without crypto-stuff.

Thank you.

handsource-dyko

I think splinter or josebita can answer this question best, at least I can't compile it under windows with mingw...

SplinterGU

Quote from: aggaz on July 30, 2011, 11:37:21 AM
Hello, I use Debian on an iBookG4 (PPC architecture) and I would like to compile Bennugd on it.
Unfortunately I have some problems with some crypto-releted stuff.

If I go to core directory and type:
./configure
make


After some verbosity I get:
b_crypt.o: In function `crypt_create':
source/bennugd/core/bgdc/src/../../common/b_crypt.c:60: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:61: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:62: undefined reference to `DES_key_sched'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:50: undefined reference to `DES_key_sched'
b_crypt.o: In function `crypt_data':
source/bennugd/core/bgdc/src/../../common/b_crypt.c:115: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:113: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:114: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:115: undefined reference to `DES_ecb_encrypt'
source/bennugd/core/bgdc/src/../../common/b_crypt.c:125: undefined reference to `DES_ecb_encrypt'
b_crypt.o:source/bennugd/core/bgdc/src/../../common/b_crypt.c:126: more undefined references to `DES_ecb_encrypt' follow
collect2: ld returned 1 exit status


Maybe it is worth to say that I get des.h from libssl-dev package:
/usr/include/openssl/des.h

I hope that someone can help me to solve this. If you don't see any solution, I would appreciate a suggestion on how to compile Bennugd without crypto-stuff.

Thank you.

you need openssl package
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

aggaz

Quoteyou need openssl package

Thank you for the reply, but I already have it.

SplinterGU

sorry, you use 64bits, you need 32bits devel environment for compile bennugd
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

aggaz

Actually I use a 32 bit enviorment, but it is not x86, it is a PPC machine, an ibookG4 with Debian GNU/Linux on it.

SplinterGU

you need libssl*.so, maybe you only install headers or sources.

install ssl runtime too...

the functions that you need are in libssl. (openssl)
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

aggaz

I am confused, I already had ssl stuff installed. Anyway now I installed anything that can be found as libssl* in the repository:
# aptitude search libssl
p libcherokee-mod-libssl
i libssl-dev
i libssl-doc
i libssl-ocaml
v libssl-ocaml-b13r9
i libssl-ocaml-dev
v libssl-ocaml-dev-b13r9
i libssl0.9.8
i libssl0.9.8-dbg
i libssl1.0.0
i libssl1.0.0-dbg

As you can se I miss libcherokee-mod-libssl only, but the compilation of core gives me the same error again and again.

Is it possible to avoid ssl stuff during compilation of core?

SplinterGU

I think that this libs aren't 32bits.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

aggaz

SplinterGU, thank you for your assistance, but I think that there is some kind of misunderstanding here.
I have an ibookG4, which has a 32bit PowerPC processor.
https://secure.wikimedia.org/wikipedia/en/wiki/PowerPC_G4

So, if you ask if I have 32 bit libs, the answer is yes. Anyway, please consider that my architechture is not x86, bu PPC (PowerPC), and maybe this is the problem here.

Need I x86 libs to compile crypto-stuff in bennu?

Can I compile bennu core without ssl support?

SplinterGU

no, you can't... but you can use an replace for it... look into 3rdparty/des-4.0.4b, and you need modify configure.in removing         USE_OPENSSL=yes and LIBSSL=..., like mingw, and regenerate configure files
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

josebita

Quote from: aggaz on August 02, 2011, 09:35:03 AM
SplinterGU, thank you for your assistance, but I think that there is some kind of misunderstanding here.
I have an ibookG4, which has a 32bit PowerPC processor.
https://secure.wikimedia.org/wikipedia/en/wiki/PowerPC_G4

So, if you ask if I have 32 bit libs, the answer is yes. Anyway, please consider that my architechture is not x86, bu PPC (PowerPC), and maybe this is the problem here.

Need I x86 libs to compile crypto-stuff in bennu?

Can I compile bennu core without ssl support?
Sorry for taking so long to answer, I completely missed this topic.
Bennu can sure be compiled in PPC systems, as the Wii console has a PPC chip inside. You will, however, run into endianess issues as bennu cannot yet use DCBs from different-endian systems. Compiling the DCB in your PPC chip and running it there should work fine, though.

As per your question, I believe OpenSSL can be compiled without DES support, so please check if support for it is included in your system's package.
I'm telling this as in Ubuntu the needed headers are in libssl-dev so I believe that should be similar. Also, please check that the compiler is not declaring the USE_LIBDES flag (to do that, go to core/include/b_crypt.h and add after [code language="c"]#ifdef USE_LIBDES[/code] in line 33 add: [code language="c"]#error USE_LIBDES defined[/code], then try to compile again).

Anyway, Bennu can be compiled without SSL support but you'll have to customize the compilation scripts yourself. Basically just remove b_crypt.c and mod_crypt from the compilation.