Libraries autogen error

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

Moderators: cheriff, TyRaNiD

Post Reply
SpaceForce
Posts: 10
Joined: Mon Dec 15, 2008 2:54 pm

Libraries autogen error

Post by SpaceForce »

I had just updated the toolchain to the latest from SVN, then compiled it

Everything works well in my previous projects, I successfully recompiled them.

But when I try to recompile some libraries using autogen.sh, such as libTremor, SDL, libogg etc, the autogen.sh evil produced all the same error:

Code: Select all

configure: error: in `/opt/SVN/libTremor':
configure: error: C compiler cannot create executables
And their error logs are the same:

Code: Select all

configure:3115: $? = 0
configure:3104: psp-gcc -v >&5
Using built-in specs.
Target: psp
Configured with: ../configure --prefix=/opt/PSPDEV --target=psp --enable-languages=c,c++ --with-newlib --with-gmp --with-mpfr --enable-cxx-flags=-G0
Thread model: single
gcc version 4.3.2 (GCC) 
configure:3115: $? = 0
configure:3104: psp-gcc -V >&5
psp-gcc: '-V' option must have argument
configure:3115: $? = 1
configure:3104: psp-gcc -qversion >&5
psp-gcc: unrecognized option '-qversion'
psp-gcc: no input files
configure:3115: $? = 1
configure:3137: checking for C compiler default output file name
configure:3159: psp-gcc   -L/opt/PSPDEV/psp/sdk/lib -lc -lpspuser conftest.c  >&5
/cygdrive/c/DOCUME~1/SPACEF~1/LOCALS~1/Temp/ccydd8Da.o: In function `main':
conftest.c:(.text+0x20): undefined reference to `fopen'
conftest.c:(.text+0x48): undefined reference to `fclose'
collect2: ld returned 1 exit status
configure:3163: $? = 1
configure:3200: result: 
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libvorbisidec"
| #define VERSION "1.2.0"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main &#40;&#41;
| &#123;
| FILE *f = fopen &#40;"conftest.out", "w"&#41;;
|  return ferror &#40;f&#41; || fclose &#40;f&#41; != 0;
| 
|   ;
|   return 0;
| &#125;
configure&#58;3206&#58; error&#58; in `/opt/SVN/libTremor'&#58;
configure&#58;3210&#58; error&#58; C compiler cannot create executables
See `config.log' for more details.



Foucus on this

Code: Select all

configure&#58;3159&#58; psp-gcc   -L/opt/PSPDEV/psp/sdk/lib -lc -lpspuser conftest.c  >&5
/cygdrive/c/DOCUME~1/SPACEF~1/LOCALS~1/Temp/ccydd8Da.o&#58; In function `main'&#58;
conftest.c&#58;&#40;.text+0x20&#41;&#58; undefined reference to `fopen'
conftest.c&#58;&#40;.text+0x48&#41;&#58; undefined reference to `fclose'
This is quite strange, because most of my successfully recompiled projects are using standard IO, there are no problems when linking, I have checked libc.a, fopen and fclose exist.

I have seen similar problems on forums, but no one fits mine, can anyone help me? thx
NJU SE
SpaceForce
Posts: 10
Joined: Mon Dec 15, 2008 2:54 pm

Post by SpaceForce »

PS: I've followed the instructions in README.PSP

Code: Select all

LDFLAGS="-L$&#40;psp-config --pspsdk-path&#41;/lib -lc -lpspuser" ./autogen.sh --host psp --prefix=$&#40;psp-config --psp-prefix&#41;
I compiled the libs successfully about 5 months ago, the only change is that I reinstalled Cygwin last week.
NJU SE
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Try changing LDFLAGS to:
LDFLAGS="-L$(psp-config --pspsdk-path)/lib --start-group -lc -lpspuser"
imhotep
Posts: 41
Joined: Tue Dec 13, 2005 9:15 pm

Post by imhotep »

jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

imhotep wrote:alternatively, see solution here:
http://forums.ps2dev.org/viewtopic.php?p=85465#85465
Huh? That's entirely unrelated.
Post Reply