ps2dev / ps2-packer

Create packed ELF files to run on the PS2
GNU General Public License v2.0
73 stars 28 forks source link

Not building for MacOS 10.13 #17

Closed fjtrujy closed 6 years ago

fjtrujy commented 6 years ago

Hello, I'm trying to compile the ps2-packer on my MacBook and I can not make it work.

Here you are the output:

$ make
/usr/bin/gcc -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" -D__APPLE__ -I/opt/local/include -L/opt/local/lib ps2-packer.c dlopen.c -ldl -o ps2-packer
ld: warning: directory not found for option '-L/opt/local/lib'
MAKE=make make -C stub
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c main.c -o main.o
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c zlib-stub.c -o zlib-stub.o
MAKE=make make -C zlib
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o adler32.o adler32.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o zutil.o zutil.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inflate.o inflate.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inffast.o inffast.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inftrees.o inftrees.c
ee-ar rc zlib.a adler32.o zutil.o inflate.o inffast.o inftrees.o
touch zlib-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o zlib-1d00-stub main.o zlib-stub.o ./zlib/zlib.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x42494c5a dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o zlib-0088-stub main.o zlib-stub.o ./zlib/zlib.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x42494c5a dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c null-stub.c -o null-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o null-1d00-stub main.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o null-0088-stub main.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c main-kmode.c -o main-kmode.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o null-kmode-1d00-stub main-kmode.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o null-kmode-0088-stub main-kmode.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c lzo-stub.c -o lzo-stub.o
MAKE=make make -C lzo
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DLSB_FIRST -DALIGN_DWORD  -c -o minilzo.o minilzo.c
ee-ar rc lzo.a minilzo.o
touch lzo-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o lzo-1d00-stub main.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o lzo-0088-stub main.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o lzo-kmode-1d00-stub main-kmode.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o lzo-kmode-0088-stub main-kmode.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2b-stub.c -o n2b-stub.o
MAKE=make make -C ucl
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2b_d.o n2b_d.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2d_d.o n2d_d.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2e_d.o n2e_d.c
ee-ar rc ucl.a n2b_d.o n2d_d.o n2e_d.o
touch ucl-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2b-1d00-stub main.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2b-0088-stub main.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2b-kmode-1d00-stub main-kmode.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2b-kmode-0088-stub main-kmode.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2d-stub.c -o n2d-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2d-1d00-stub main.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2d-0088-stub main.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2d-kmode-1d00-stub main-kmode.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2d-kmode-0088-stub main-kmode.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2e-stub.c -o n2e-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2e-1d00-stub main.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2e-0088-stub main.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2e-kmode-1d00-stub main-kmode.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2e-kmode-0088-stub main-kmode.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles -Wl,--defsym,_start_address=0x1d00000 -o n2e-asm-1d00-stub n2e-asm-stub.S -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s -DARGS_IN_S
ee-gcc -nostartfiles -Wl,--defsym,_start_address=0x1d00000 -o n2e-asm-one-1d00-stub n2e-asm-one-stub.S -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s -DARGS_IN_S
touch stubs-tag.stamp
cp stub/n2e-asm-one-1d00-stub ./b_stub_one
bin2c b_stub_one builtin_stub_one.c builtin_stub_one
rm b_stub_one
/usr/bin/gcc  -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" -D__APPLE__ -I/opt/local/include -L/opt/local/lib  -c -o builtin_stub_one.o builtin_stub_one.c
clang: warning: argument unused during compilation: '-L/opt/local/lib' [-Wunused-command-line-argument]
cp stub/n2e-asm-1d00-stub ./b_stub
bin2c b_stub builtin_stub.c builtin_stub
rm b_stub
/usr/bin/gcc  -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" -D__APPLE__ -I/opt/local/include -L/opt/local/lib  -c -o builtin_stub.o builtin_stub.c
clang: warning: argument unused during compilation: '-L/opt/local/lib' [-Wunused-command-line-argument]
/usr/bin/gcc -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" -D__APPLE__ -I/opt/local/include -L/opt/local/lib -DPS2_PACKER_LITE ps2-packer.c n2e-packer.c -lucl builtin_stub_one.o builtin_stub.o -ldl -o ps2-packer-lite
ld: warning: directory not found for option '-L/opt/local/lib'
Undefined symbols for architecture x86_64:
  "_ucl_nrv2e_99_compress", referenced from:
      _pack_section in n2e-packer-ed230d.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: *** [ps2-packer-lite] Error 1

I have noticed several things:

If you need more info just ping me.

Thanks

sp193 commented 6 years ago

Your libucl is missing "_ucl_nrv2e_99_compress". Do you have libucl-dev installed?

We can remove the additional include & lib directories, if it is not actually used for MacOS.

What's wrong with the ps2-packer-lite target?

fjtrujy commented 6 years ago

Hello, So here you are new info.

On the Mac I have installed libucl 0.8.0 but not the libucl-dev version, I have installed it through brew install libucl

On the other hand I have just tried in Linux Mint, and is not working either, a different error appears

$ make
gcc -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" ps2-packer.c dlopen.c -ldl -o ps2-packer
MAKE=make make -C stub
make[1]: se entra en el directorio '/home/trujy/Projects/ps2-packer/stub'
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c main.c -o main.o
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c zlib-stub.c -o zlib-stub.o
MAKE=make make -C zlib
make[2]: se entra en el directorio '/home/trujy/Projects/ps2-packer/stub/zlib'
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o adler32.o adler32.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o zutil.o zutil.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inflate.o inflate.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inffast.o inffast.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DNO_GZIP -DBUILDFIXED -DNO_vsnprintf  -c -o inftrees.o inftrees.c
ee-ar rc zlib.a adler32.o zutil.o inflate.o inffast.o inftrees.o
make[2]: se sale del directorio '/home/trujy/Projects/ps2-packer/stub/zlib'
touch zlib-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o zlib-1d00-stub main.o zlib-stub.o ./zlib/zlib.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x42494c5a dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o zlib-0088-stub main.o zlib-stub.o ./zlib/zlib.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x42494c5a dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c null-stub.c -o null-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o null-1d00-stub main.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o null-0088-stub main.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c main-kmode.c -o main-kmode.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o null-kmode-1d00-stub main-kmode.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o null-kmode-0088-stub main-kmode.o null-stub.o -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x4c4c554e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c lzo-stub.c -o lzo-stub.o
MAKE=make make -C lzo
make[2]: se entra en el directorio '/home/trujy/Projects/ps2-packer/stub/lzo'
ee-gcc  -G0 -I . -D_EE -O3 -Wall -DLSB_FIRST -DALIGN_DWORD  -c -o minilzo.o minilzo.c
ee-ar rc lzo.a minilzo.o
make[2]: se sale del directorio '/home/trujy/Projects/ps2-packer/stub/lzo'
touch lzo-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o lzo-1d00-stub main.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o lzo-0088-stub main.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o lzo-kmode-1d00-stub main-kmode.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o lzo-kmode-0088-stub main-kmode.o lzo-stub.o ./lzo/lzo.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x314f5a4c dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2b-stub.c -o n2b-stub.o
MAKE=make make -C ucl
make[2]: se entra en el directorio '/home/trujy/Projects/ps2-packer/stub/ucl'
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2b_d.o n2b_d.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2d_d.o n2d_d.c
ee-gcc  -G0 -I . -D_EE -O3 -Wall  -c -o n2e_d.o n2e_d.c
ee-ar rc ucl.a n2b_d.o n2d_d.o n2e_d.o
make[2]: se sale del directorio '/home/trujy/Projects/ps2-packer/stub/ucl'
touch ucl-tag.stamp
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2b-1d00-stub main.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2b-0088-stub main.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2b-kmode-1d00-stub main-kmode.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2b-kmode-0088-stub main-kmode.o n2b-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3142324e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2d-stub.c -o n2d-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2d-1d00-stub main.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2d-0088-stub main.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2d-kmode-1d00-stub main-kmode.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2d-kmode-0088-stub main-kmode.o n2d-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3144324e dummy.s
ee-gcc  -G0 -I /usr/local/ps2dev/ps2sdk/ee/include -I /usr/local/ps2dev/ps2sdk/common/include -I . -I zlib -I lzo -I ucl -D_EE -O3 -Wall -DDO_EXECPS2  -c n2e-stub.c -o n2e-stub.o
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2e-1d00-stub main.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2e-0088-stub main.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x1d00000 -o n2e-kmode-1d00-stub main-kmode.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles ./crt0.s -Wl,--defsym,_start_address=0x0088000 -o n2e-kmode-0088-stub main-kmode.o n2e-stub.o ./ucl/ucl.a -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s
ee-gcc -nostartfiles -Wl,--defsym,_start_address=0x1d00000 -o n2e-asm-1d00-stub n2e-asm-stub.S -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s -DARGS_IN_S
ee-gcc -nostartfiles -Wl,--defsym,_start_address=0x1d00000 -o n2e-asm-one-1d00-stub n2e-asm-one-stub.S -T ./linkfile -L /usr/local/ps2dev/ps2sdk/ee/lib -lc -lkernel -lc -Wl,--defsym,_signature=0x3145324e dummy.s -DARGS_IN_S
make[1]: se sale del directorio '/home/trujy/Projects/ps2-packer/stub'
touch stubs-tag.stamp
cp stub/n2e-asm-one-1d00-stub ./b_stub_one
bin2c b_stub_one builtin_stub_one.c builtin_stub_one
rm b_stub_one
gcc  -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\"  -c -o builtin_stub_one.o builtin_stub_one.c
builtin_stub_one.c:5:22: warning: ‘builtin_stub_one’ defined but not used [-Wunused-variable]
 static unsigned char builtin_stub_one[] __attribute__((aligned(16))) = {
                      ^~~~~~~~~~~~~~~~
builtin_stub_one.c:4:21: warning: ‘size_builtin_stub_one’ defined but not used [-Wunused-variable]
 static unsigned int size_builtin_stub_one = 8147;
                     ^~~~~~~~~~~~~~~~~~~~~
cp stub/n2e-asm-1d00-stub ./b_stub
bin2c b_stub builtin_stub.c builtin_stub
rm b_stub
gcc  -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\"  -c -o builtin_stub.o builtin_stub.c
builtin_stub.c:5:22: warning: ‘builtin_stub’ defined but not used [-Wunused-variable]
 static unsigned char builtin_stub[] __attribute__((aligned(16))) = {
                      ^~~~~~~~~~~~
builtin_stub.c:4:21: warning: ‘size_builtin_stub’ defined but not used [-Wunused-variable]
 static unsigned int size_builtin_stub = 8392;
                     ^~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I. -DVERSION=\"1.1.0\" -DPREFIX=\"/usr/local/ps2dev\" -DPS2_PACKER_LITE ps2-packer.c n2e-packer.c -lucl builtin_stub_one.o builtin_stub.o -ldl -o ps2-packer-lite
/tmp/ccI0nN0b.o: En la función `load_stub':
ps2-packer.c:(.text+0x3dc): referencia a `builtin_stub_one' sin definir
ps2-packer.c:(.text+0x3e9): referencia a `builtin_stub' sin definir
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target 'ps2-packer-lite' failed
make: *** [ps2-packer-lite] Error 1
fjtrujy commented 6 years ago

I have now even more info:

$ brew info libucl
libucl: stable 0.8.1 (bottled)
Universal configuration library parser
https://github.com/vstakhov/libucl
/usr/local/Cellar/libucl/0.8.0 (12 files, 355.8KB)
  Poured from bottle on 2017-11-15 at 00:54:20
/usr/local/Cellar/libucl/0.8.1 (15 files, 413.9KB) *
  Poured from bottle on 2018-09-30 at 23:47:15
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libucl.rb
==> Dependencies
Build: autoconf ✔, automake ✔, libtool ✔, pkg-config ✔
==> Analytics
install: 13 (30d), 39 (90d), 82 (365d)
install_on_request: 12 (30d), 36 (90d), 76 (365d)
build_error: 0 (30d)

This is the repo installed from brew https://github.com/vstakhov/libucl, I have been taking a look and definitively there are no implementation for the function: ucl_nrv2e_99_compress. Some how the version for libucl and the version available for Mac are different.

PS: I have been investigating the version on Linux and it is 1.0.3+repack-4... so far I don't find this version on Mac

Thanks

sp193 commented 6 years ago

Hold on. That libucl stands for "Universal configuration library parser". That is not the same as UCL.

fjtrujy commented 6 years ago

So, yes you are totally right, I was confuse.

Now is compiling.

Should we mention in the Readme what are the dependencies? I can create a PR if you want.

Thanks and sorry for the noise