Hi guys, I know there was another topic on this, but the solution didn't help. I have successfully built the toolchain and libraries on Debian and Ubuntu, but I can't get the libraries to fully build under cygwin:
configure:2815: psp-gcc --version >&5
psp-gcc (GCC) 4.3.2
Copyright (C) 2008 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.
configure:2826: $? = 0
configure:2815: psp-gcc -v >&5
Using built-in specs.
Target: psp
Configured with: ../configure --prefix=/usr/local/pspdev --target=psp --enable-l
anguages=c,c++ --with-newlib --with-gmp --with-mpfr --enable-cxx-flags=-G0
Thread model: single
gcc version 4.3.2 (GCC)
configure:2826: $? = 0
configure:2815: psp-gcc -V >&5
psp-gcc: '-V' option must have argument
configure:2826: $? = 1
configure:2815: psp-gcc -qversion >&5
psp-gcc: unrecognized option '-qversion'
psp-gcc: no input files
configure:2826: $? = 1
configure:2848: checking for C compiler default output file name
configure:2870: psp-gcc -L/usr/local/pspdev/lib -L/usr/local/pspdev/psp/lib -L
/usr/local/pspdev/psp/sdk/lib -lpsplibc -lpspuser conftest.c >&5
/cygdrive/c/DOCUME~1/Anthony/LOCALS~1/Temp/cc2SPKY5.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:2874: $? = 1
configure:2911: 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 ""
| /* end confdefs.h. */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
| return ferror (f) || fclose (f) != 0;
|
| ;
| return 0;
| }
configure:2917: error: in `/home/Anthony/src/psplibraries/build/freetype/builds/unix':
configure:2921: error: C compiler cannot create executables
See `config.log' for more details.
Looking further:
Now, in the other thread it was suggested the toolchain did not build properly. I have removed cygwin, and the toolchain, and reinstalled and rebuilt, and always get this error. I am pretty sure that the toolchain had built correctly. Also the library holds the symbol:
Where is it getting that commandline from? Did you specify LDFLAGS yourself when compiling? Nowhere in the psplibraries script, nor in freetype, does it contain the string "psplibc". It should be using just "-lc" there.
Yeah its libc. I just tried psplibc to se if I'd get any further (and yes, I know plain libc is preferred). Also I added -L/usr/local/pspdev/psp/lib just to cover all bases (although if it couldn't find the lib that would be the error I would get).
I also wanted to add that unlike in similar threads, I can not compile a program separately. In other words if I try to make a simple program outside of 'configure' it still fails with the same errors.
I am very familiar with Linux and never have this problem, but need Cygwin as I don't have access to Linux at work.
google "cygwin error: C compiler cannot create executables", then search your system for other instances of cygwin1.dll outside the cygwin install directory (such as the most common abuse of this dll which is found in /windows/system)
Once that is done, consider using heimdall's pre-built-and-windows-ized toolchain (link) instead just in case that work PC relies on the software that installed the extraneous/mismatched cygwin dll files.
Thanks, but the problem isn't "C Compiler cannot create executables" because the answer's right in config.log.
When I first installed cygwin, I got an error about mismatched cygwin-1.dlls. I promptly deleted every one but in the Cygwin dir and verified the version, so that's not the problem.
The computers at work really don't have much but McAfee and Novell software installed so I didn't think of cygwin-1 on those computers. You may have a point there, thanks.
I already answered the question -- that error is because you edited the script and changed -lc to -lpsplibc or whatever. If you're still getting an error with an unmodified psplibraries script, post that config.log here and we'll see what we can do.