 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
paraita

Joined: 25 Sep 2007 Posts: 12 Location: Nice, France
|
Posted: Wed Sep 26, 2007 1:45 pm Post subject: problem compiling toolchain under Mac Os X |
|
|
Hello, i svned toolchain yesterday and tried to run the toolchain.sh script, at first i had trouble when it came to 001-binutils-2.16.1.sh but i figured out how to continue (thx to Usefullidiot) but then, at 009-psplinkusb.sh it just fail with a:
| Code: |
make[1]:*** [main.o] Error 1
make: *** [all] Error 2
../scripts/009-pspusblink.sh:Failed.
|
did any mac user had the same problem ? |
|
| Back to top |
|
 |
bulb
Joined: 19 Jan 2006 Posts: 50
|
|
| Back to top |
|
 |
paraita

Joined: 25 Sep 2007 Posts: 12 Location: Nice, France
|
Posted: Thu Sep 27, 2007 10:47 am Post subject: |
|
|
i've already tried that too, i'll try to remove and download psptoolchain again tomorrow, but thx for the link, i'll search more.
edit: i got this, following what you said in your post:
| Code: | make -C pspsh clean
rm -f pspsh *.o
make -C usbhostfs_pc clean
rm -f usbhostfs_pc *.o
make -C tools/remotejoy/pcsdl clean
rm -f remotejoy *.o
make -C pspsh all
make[1]: *** No rule to make target `pspsh.o', needed by `pspsh'. Stop.
make: *** [all] Error 2
../scripts/009-psplinkusb.sh: Failed. |
did you had the same error ? |
|
| Back to top |
|
 |
bulb
Joined: 19 Jan 2006 Posts: 50
|
Posted: Thu Sep 27, 2007 11:38 pm Post subject: |
|
|
I don't remember having to deal with such weird error messages.
Go to psptoolchain/build/psplinkusb/pspsh/ directory. Type:
make clean
Next, type:
make
See if it compiles, if not, send me the output of that 2nd make command. Also, type:
g++ --version
This is the output of my C++ compiler version:
i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Thu Sep 27, 2007 11:47 pm Post subject: |
|
|
| Check StrmnNrmns blog for install tips for OSX :) |
|
| Back to top |
|
 |
bulb
Joined: 19 Jan 2006 Posts: 50
|
Posted: Fri Sep 28, 2007 12:11 am Post subject: |
|
|
| StrmnNrmn didn't have an issue with the 9th step of psptoolchain script, at least he didn't make a comment about it. :) |
|
| Back to top |
|
 |
paraita

Joined: 25 Sep 2007 Posts: 12 Location: Nice, France
|
Posted: Sat Sep 29, 2007 7:49 am Post subject: |
|
|
ok, i did a in the /usr/local/pspdev/psptoolchain/build/psplinkusb/pspsh directory, then did a in that same directory, here's the output:
| Code: | g++ -Wall -g -D_PCTERM -I../psplink -c -o pspsh.o pspsh.C
pspsh.C: In function 'int execute_line(const char*)':
pspsh.C:232: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:232: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C: In function 'int close_cmd(int, char**)':
pspsh.C:429: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:429: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C: In function 'int strlen_cmd(int, char**)':
pspsh.C:439: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
pspsh.C: In function 'int tty_cmd(int, char**)':
pspsh.C:463: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:463: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C: In function 'void cli_handler(char*)':
pspsh.C:574: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:574: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C:601: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:601: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C: In function 'void completion_display(char**, int, int)':
pspsh.C:913: error: 'rl_forced_update_display' was not declared in this scope
pspsh.C: In function 'char** shell_completion(const char*, int, int)':
pspsh.C:934: error: 'rl_filename_completion_function' was not declared in this scope
pspsh.C:934: error: 'rl_completion_matches' was not declared in this scope
pspsh.C:940: error: invalid conversion from 'void (*)(char**, int, int)' to 'void (*)()'
pspsh.C:941: error: 'rl_completion_matches' was not declared in this scope
pspsh.C:945: error: 'rl_completion_matches' was not declared in this scope
pspsh.C:950: error: invalid conversion from 'void (*)(char**, int, int)' to 'void (*)()'
pspsh.C:953: error: 'rl_completion_matches' was not declared in this scope
pspsh.C:957: error: 'rl_completion_matches' was not declared in this scope
pspsh.C: In function 'int init_readline()':
pspsh.C:972: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:972: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
pspsh.C: In function 'int process_cmd(const unsigned char*)':
pspsh.C:1450: error: invalid conversion from 'void (*)(char*)' to 'void (*)()'
pspsh.C:1450: error: initializing argument 2 of 'void rl_callback_handler_install(const char*, void (*)())'
make: *** [pspsh.o] Error 1 |
here's my g++ version:
| Code: | i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
i used Darwinports instead of Fink, but i don't really think the problem is from DP, do you have any idea ? |
|
| Back to top |
|
 |
bulb
Joined: 19 Jan 2006 Posts: 50
|
Posted: Sat Sep 29, 2007 7:58 pm Post subject: |
|
|
paraita,
Ok, I had exactly the same problem - compiler is using BSD readline headers instead of the GNU ones.
I have used MacPorts to download/install required packages. It is essentially the same as DarwinPorts.
Here's the solution to your problem:
1. Check if you have GNU readline package installed. Type:
port installed | grep readline
2. If you don't have readline installed, type:
sudo port install readline
3. Check if you have readline installed in /opt/local (this is default directory for MacPorts and I am not 100% about DarwinPorts). Type:
ls -la /opt/local/include | grep readline
4. I will assume you have it installed in /opt/local directory. Type these lines:
export C_INCLUDE_PATH="/opt/local/include"
export CPLUS_INCLUDE_PATH="/opt/local/include"
export LIBRARY_PATH="/opt/local/lib"
5. Now make the psplinkusb. |
|
| Back to top |
|
 |
paraita

Joined: 25 Sep 2007 Posts: 12 Location: Nice, France
|
Posted: Sun Sep 30, 2007 3:11 pm Post subject: |
|
|
i uninstalled darwinport and put macport instead (wishing it would work lol), i followed ragnaru's help but at the end i had the same problem, anyway, i tried what you told me and i got this after the make command in build/psplinkusb/pspsh/ :
| Code: | g++ -Wall -g -D_PCTERM -I../psplink -c -o pspsh.o pspsh.C
pspsh.C: In function 'int strlen_cmd(int, char**)':
pspsh.C:439: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
g++ -Wall -g -D_PCTERM -I../psplink -c -o parse_args.o parse_args.C
g++ -Wall -g -D_PCTERM -I../psplink -c -o pspkerror.o pspkerror.C
g++ -Wall -g -D_PCTERM -I../psplink -c -o asm.o asm.C
g++ -Wall -g -D_PCTERM -I../psplink -c -o disasm.o disasm.C
g++ -o pspsh pspsh.o parse_args.o pspkerror.o asm.o disasm.o -lreadline -lcurses |
i don't have any error output, do you think it's ok like that ? do i have to run the toolchain script again ? |
|
| Back to top |
|
 |
bulb
Joined: 19 Jan 2006 Posts: 50
|
Posted: Mon Oct 01, 2007 2:05 am Post subject: |
|
|
You needn't install MacPorts. They are basically the same, I was just not sure which directory DP uses for installation packages.
Anyway, build of pspsh works 100% now, you'll just have to apply the changes for the remotejoy (by following instructions on http://forums.ps2dev.org/viewtopic.php?t=8918&highlight=) and the toolchain will work.
Note, if you are going to use remotejoy, you'll have to do some changes as well, otherwise you will have to kill the process after every use. Minimal change is to comment out SDL_KillThread in remotejoy.c. |
|
| Back to top |
|
 |
paraita

Joined: 25 Sep 2007 Posts: 12 Location: Nice, France
|
Posted: Thu Oct 04, 2007 10:40 am Post subject: |
|
|
| hi, i tried to run toolchain.sh again, after i typed a successful make in build/psplinkusb/pspsh/ , but toolchain just fails with the same error, i'll wait for a newer revision, if i find a way to run toolchain without errors, i'll post here ^^. thx anyway for your help bulb ! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|