Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Cuthroatdie
Posts: 10 Joined: Fri Dec 18, 2009 3:16 am
Post
by Cuthroatdie » Fri Dec 18, 2009 3:23 am
Hello. I'm trying to port freeciv to the PSP (about time!). I am using the latest stable source (2.1.10).
I run this when trying to compile:
Code: Select all
CC=/usr/local/pspdev/bin/psp-gcc CXX=/usr/local/pspdev/bin/psp-g++ ./configure --target=psp
but it comes up with the following error:
Code: Select all
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... /usr/local/pspdev/bin/psp-gcc
checking for C compiler default output file name...
configure: error: in `/home/peter/dev/freeciv-2.1.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Any ideas?
jojojoris
Posts: 255 Joined: Sun Mar 30, 2008 4:06 am
Post
by jojojoris » Fri Dec 18, 2009 5:09 am
Cuthroatdie wrote: Hello. I'm trying to port freeciv to the PSP (about time!). I am using the latest stable source (2.1.10).
I run this when trying to compile:
Code: Select all
CC=/usr/local/pspdev/bin/psp-gcc CXX=/usr/local/pspdev/bin/psp-g++ ./configure --target=psp
but it comes up with the following error:
Code: Select all
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... /usr/local/pspdev/bin/psp-gcc
checking for C compiler default output file name...
configure: error: in `/home/peter/dev/freeciv-2.1.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Any ideas?
what about:
Code: Select all
CFLAGS="-G0" LDFLAGS="-L$(psp-config --psp-prefix)/lib -L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lstdc++ -lpsplibc -lpspuser " ./configure --host=psp --prefix=$(psp-config --psp-prefix) ac_cv_lib_z_gzgets=yes --enable-client=sdl ac_cv_lib_SDL_image_IMG_Load=yes --disable-nls
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
Cuthroatdie
Posts: 10 Joined: Fri Dec 18, 2009 3:16 am
Post
by Cuthroatdie » Fri Dec 18, 2009 7:58 am
Thanks for that, I managed to get somewhere by using this:
Code: Select all
CC=/usr/local/pspdev/bin/psp-gcc CXX=/usr/local/pspdev/bin/psp-g++ CFLAGS="-G0" LDFLAGS="-L$(psp-config --psp-prefix)/lib -L$(psp-config --pspsdk-path)/lib" LIBS="-lc -lstdc++ -lpsplibc -lpspuser " ./configure --target=psp --host=i686-pc-linux-gnulibc1 --prefix=$(psp-config --psp-prefix) ac_cv_lib_z_gzgets=yes --enable-client=sdl ac_cv_lib_SDL_image_IMG_Load=yes --disable-nls
(a mixture of both of the commands!)
I had to set the --host flag to my pc and --target to psp. Configure now goes further, but shows me
Code: Select all
configure: error: Iconv is missing. You can get libiconv from http://gnu.org/, or try using --with-libiconv-prefix
(even with --disable-nls). So it seems I will have to get the libiconv library working with the psp compiler. Luckily this guy offers some help:
http://freeciv.wikia.com/wiki/User:Jdorje/crosscompile
jojojoris
Posts: 255 Joined: Sun Mar 30, 2008 4:06 am
Post
by jojojoris » Fri Dec 18, 2009 9:47 pm
I rebuild psp newlib with iconv enabled.
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
Cuthroatdie
Posts: 10 Joined: Fri Dec 18, 2009 3:16 am
Post
by Cuthroatdie » Fri Dec 18, 2009 10:29 pm
Ok, but how do I do that? I can't find it on the svn.
jojojoris
Posts: 255 Joined: Sun Mar 30, 2008 4:06 am
Post
by jojojoris » Sat Dec 19, 2009 12:23 am
configure newlib with --enable-newlib-iconv option
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
Cuthroatdie
Posts: 10 Joined: Fri Dec 18, 2009 3:16 am
Post
by Cuthroatdie » Sat Dec 19, 2009 12:43 am
Where can I get newlib - It didn't seem to be on the svn
jojojoris
Posts: 255 Joined: Sun Mar 30, 2008 4:06 am
Post
by jojojoris » Sat Dec 19, 2009 8:12 am
just look inside the psptoolchain build script.
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
Cuthroatdie
Posts: 10 Joined: Fri Dec 18, 2009 3:16 am
Post
by Cuthroatdie » Sun Dec 20, 2009 1:59 am
Thanks people, i got configure to work. Now onto the makefile...