Freeciv PSP port ./configure error

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Cuthroatdie
Posts: 10
Joined: Fri Dec 18, 2009 3:16 am

Freeciv PSP port ./configure error

Post by Cuthroatdie »

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

Re: Freeciv PSP port ./configure error

Post by jojojoris »

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 »

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 »

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 »

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 »

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 »

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 »

just look inside the psptoolchain build script.

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Raiden
Posts: 10
Joined: Sat Nov 14, 2009 7:17 pm

Post by Raiden »

Yeah, but it seems like the server mentioned in the psptoolchain build script is down. So instead of it use this adress: http://ftp.eenet.ee/pub/FreeBSD/distfil ... 6.0.tar.gz
Cuthroatdie
Posts: 10
Joined: Fri Dec 18, 2009 3:16 am

Post by Cuthroatdie »

Thanks people, i got configure to work. Now onto the makefile...
Post Reply