Freetype compilation rpoblem

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

Moderators: cheriff, TyRaNiD

Post Reply
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Freetype compilation rpoblem

Post by jojojoris »

I'm trying to compile thepsplibraries.

When i want to install freetype i had to use the commands:

Code: Select all

   sh autogen.sh
   LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --prefix=$(psp-config --psp-prefix)
   make
   make install 

Code: Select all

joris@joris-desktop:~/psp/trunk/freetype$ sh autogen.sh
running `aclocal -I .'
running `libtoolize --copy'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
running `autoconf'
joris@joris-desktop:~/psp/trunk/freetype$ LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --prefix=$(psp-config --psp-prefix)
cd builds/unix; ./configure --host psp --prefix=/usr/local/pspdev/psp
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... /bin/bash: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
make: *** [builds/unix/unix-def.mk] Fout 1
joris@joris-desktop:~/psp/trunk/freetype$
[/code]

Do i something wrong?
How can i fix it?
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Please help!!!
I've waited a while.
Now i come this far.

Code: Select all

joris@joris-desktop:~/psp/trunk/trunk/freetype$ sh autogen.sh
running `aclocal -I .'
running `libtoolize --copy'
You should update your `aclocal.m4' by running aclocal.
libtoolize: `config.guess' exists: use `--force' to overwrite
libtoolize: `config.sub' exists: use `--force' to overwrite
libtoolize: `ltmain.sh' exists: use `--force' to overwrite
running `autoconf'
joris@joris-desktop:~/psp/trunk/trunk/freetype$ LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser"       ./configure --host psp --prefix=$(psp-config --psp-prefix)
cd builds/unix; ./configure --host psp --prefix=/usr/local/pspdev/psp
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... mipsallegrexel-psp-elf
checking target system type... mipsallegrexel-psp-elf
checking for psp-gcc... psp-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether psp-gcc accepts -g... yes
checking for psp-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... psp-gcc -E
checking for rm... rm -f
checking for rmdir... rmdir
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... no
checking for working mmap... no
checking for memcpy... no
checking for memmove... no
checking for gzsetparams in -lz... no
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by psp-gcc... /usr/local/pspdev/psp/bin/ld
checking if the linker (/usr/local/pspdev/psp/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/local/pspdev/bin/psp-nm -B
checking the name lister (/usr/local/pspdev/bin/psp-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 805306365
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/local/pspdev/psp/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... unknown
checking for psp-ar... psp-ar
checking for psp-strip... psp-strip
checking for psp-ranlib... psp-ranlib
checking command to parse /usr/local/pspdev/bin/psp-nm -B output from psp-gcc object... ok
checking for dlfcn.h... no
checking for objdir... .libs
checking if psp-gcc supports -fno-rtti -fno-exceptions... no
checking for psp-gcc option to produce PIC... -fPIC -DPIC
checking if psp-gcc PIC flag -fPIC -DPIC works... yes
checking if psp-gcc static flag -static works... yes
checking if psp-gcc supports -c -o file.o... yes
checking if psp-gcc supports -c -o file.o... (cached) yes
checking whether the psp-gcc linker (/usr/local/pspdev/psp/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: WARNING:  unix-def.in seems to ignore the --datarootdir setting
config.status: creating freetype-config
config.status: creating freetype2.pc
config.status: creating ftconfig.h
config.status: executing libtool commands

FreeType build system -- automatic system detection

The following settings are used:

  platform                    unix
  compiler                    cc
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).

make: Er hoeft niets gedaan te worden voor 'unix'.
joris@joris-desktop:~/psp/trunk/trunk/freetype$ make
./builds/unix/libtool --mode=compile psp-gcc  -I/home/joris/psp/trunk/trunk/freetype/objs -I./builds/unix -I/home/joris/psp/trunk/trunk/freetype/include -c -G0  -g -O2 -DDARWIN_NO_CARBON -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -o /home/joris/psp/trunk/trunk/freetype/objs/ftsystem.lo /home/joris/psp/trunk/trunk/freetype/src/base/ftsystem.c
./builds/unix/libtool&#58; line 821&#58; X--mode=compile&#58; command not found
./builds/unix/libtool&#58; line 988&#58; *** Warning&#58; inferring the mode of operation is deprecated.&#58; command not found
./builds/unix/libtool&#58; line 989&#58; *** Future versions of Libtool will require --mode=MODE be specified.&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; Xpsp-gcc&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-I/home/joris/psp/trunk/trunk/freetype/objs&#58; No such file or directory
./builds/unix/libtool&#58; line 1132&#58; X-I./builds/unix&#58; No such file or directory
./builds/unix/libtool&#58; line 1132&#58; X-I/home/joris/psp/trunk/trunk/freetype/include&#58; No such file or directory
./builds/unix/libtool&#58; line 1132&#58; X-c&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-G0&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-g&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-O2&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-DDARWIN_NO_CARBON&#58; command not found
./builds/unix/libtool&#58; line 1132&#58; X-DFT_CONFIG_CONFIG_H=<ftconfig.h>&#58; command not found
./builds/unix/libtool&#58; line 1185&#58; X/home/joris/psp/trunk/trunk/freetype/objs/ftsystem.lo&#58; No such file or directory
./builds/unix/libtool&#58; line 1190&#58; libtool&#58; compile&#58; cannot determine name of library object from `'&#58; command not found
make&#58; *** &#91;/home/joris/psp/trunk/trunk/freetype/objs/ftsystem.lo&#93; Fout 1
joris@joris-desktop&#58;~/psp/trunk/trunk/freetype$ 
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

I discovered that not only freetype has got this problem but all libs which uses libtool.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Code: Select all

svn co svn&#58;//svn.ps2dev.org/psp/trunk/psptoolchain
Then follow the directions in the readme-ubuntu.txt file. Assuming the toolchain installs correctly, you're then ready to compile the libs.

Code: Select all

svn co svn&#58;//svn.ps2dev.org/psp/trunk/psplibraries
cd psplibraries
./libraries.sh
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

jojojoris is correct, anything which uses libtool fails to build since we updated the gcc version.
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Does this mean that i can't install a lot of useful libraries or is an solution available.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

But libtool isn't built by psptoolchain, I don't see how that can be a problem. Have you also upgraded your version of libtool recently?
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Adding the following:

Code: Select all

automake --add-missing
Will install the missing config.guess file and allow compilation to begin.

I'll update the repository copy and start looking at other libraries in psplibraries.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

I've run out of time, I'll look at it later.
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

ooPo wrote:But libtool isn't built by psptoolchain, I don't see how that can be a problem. Have you also upgraded your version of libtool recently?
Yes and No. I've tried about 5 different versions.
ooPo wrote:Adding the following:

Code: Select all

automake --add-missing
Will install the missing config.guess file and allow compilation to begin.

I'll update the repository copy and start looking at other libraries in psplibraries.
How must i use

Code: Select all

automake --add-missing
I put it in the autogen.sh script and i tried to run it myself. Both didn't do the job.
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

I Found some sort of solution.

After i run the ./configure script from freetype i replaced the libtool with the libtool provided by the SDL librarie.

When i now run make it compiles.

If i want to do "make install" i had to tweak the script 003-freetype.sh

Code: Select all

#!/bin/sh
# freetype.sh by Dan Peori &#40;danpeori@oopo.net&#41;

 ## Download the latest source code.

##Removed

 ## Enter the source directory.
 cd freetype || &#123; exit 1; &#125;

 ## Configure the build.

## removed autogen.sh

## removed confidure script

 ## Compile and install.
 make clean && make -j2 && make install && make clean || &#123; exit 1; &#125;
[/code]
foebea
Posts: 9
Joined: Fri Mar 23, 2007 9:03 pm

Post by foebea »

I ran into the same problem when I tried to run the psplibraries, here is what I found, hope it helps.

I stepped through the script files one at a time and here are the results and the fixes in easy enough steps to follow.

1. run 'automake --add-missing' in 'psplibraries/build/freetype/builds/unix'

2. in pspirkeyb/asciidemo - main.c:12:22: error: kubridge.h: No such file or directory
J.F from PS2Dev says "That's in D_A's SDK. The latest one is in the 4.01M33-2.rar archive."

3. SDL seems to require pspirkeyb

4. smpeg-psp seems to require pspirkeyb


So there are the 4 non working bits. it seems as though we have fixes for them all now.

Just run automake in the unix directory as in step 1. you cant just run it from any directory you happen to be in.

Then grab the 4.01 here: http://www.psp-hacks.com/file/1510 or google "4.01M33-2.rar" and get it anywhere you prefer.
Copy the include and lib folder from the sdk part of 4.01m33 into /usr/local/pspdev/psp

All should now be well.
Just in case you run into errors somehow, my exact process was to run 'libraries-sudo.sh' and then cry a little, sudo su and run 'libraries.sh' and have a beer. After that I came here and to psp-hacks forum, read what was there followed by about an hour of tv. finally i went into the scripts directory and ran each sh file as root in order, noted any errors and resolved them.

I have not yet rerun the libraries script as a whole, so there may be some other issue remaining on that side. I have not reviewed it at all so am not sure if it hits anything other than these scripts.

To reiterate, this all works now. Yay!
Last edited by foebea on Wed Dec 31, 2008 1:05 am, edited 1 time in total.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

One of these days D_A's SDK will get incorporated into the SDK here. It's not like it's updated very often - it would be almost no work to keep it up to date. :)

Until then you need to either get it yourself, or include it in the project (wasteful) like DaedalusX64 does.
xantares
Posts: 16
Joined: Tue Dec 30, 2008 4:09 am

Post by xantares »

Hi, I think my script just succeed to build the toolchain and all the psplibrairies thanks to your advices foebea

It's quite ugly but it seems to work :
http://my-trac.assembla.com/ayn5-84BSr3 ... sp_tool.sh
Post Reply