How to compile PSPSDK in windows.

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

How to compile PSPSDK in windows.

Post by jojojoris »

I know i can use Minpspw or linux but...

Is it still possible to compile the toolchain in windows?

If yes How?

I tried cygwin but it failed with ./configure from binutils?


I also tried to setup an Msys environment but that also didn't work right?

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

It should work in cygwin or maybe even msys...
but our crystal balls are hazy so you'll have to give us more info if you want help.
moonblood
Posts: 9
Joined: Fri Oct 16, 2009 11:26 pm
Location: ドイツ
Contact:

Post by moonblood »

Try this tutorial. It worked fine for me ;-)
"It was a dark, cold night. The moon shines bright and while admire it fade to blood-red. So the night was fulfilled of the bloody death..."
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Sorry.

This is the ./configure output. (At least the part which was still in the console)

Code: Select all

yes
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/splay-tree.c -o pic/splay-tree.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/splay-tree.c -o splay-tree.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/strerror.c -o pic/strerror.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/strerror.c -o strerror.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/strsignal.c -o pic/strsignal.o; \
else true; fi
checking for strings.h... gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/..
/include  -W -Wall -Wtraditional -pedantic ../../libiberty/strsignal.c -o strsig
nal.o
../../libiberty/strsignal.c: In function 'psignal':
../../libiberty/strsignal.c:567: warning: comparison between signed and unsigned

if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/ternary.c -o pic/ternary.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/ternary.c -o ternary.o
../../libiberty/ternary.c:153: warning: 'ternary_recursivesearch' defined but no
t used
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/unlink-if-ordinary.c -o pic/unlink-if-ordina
ry.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/unlink-if-ordinary.c -o unlink-if-ordinary.o
../../libiberty/unlink-if-ordinary.c: In function 'unlink_if_ordinary':
../../libiberty/unlink-if-ordinary.c:66: warning: implicit declaration of functi
on 'lstat'
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xatexit.c -o pic/xatexit.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xatexit.c -o xatexit.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xexit.c -o pic/xexit.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xexit.c -o xexit.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xmalloc.c -o pic/xmalloc.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xmalloc.c -o xmalloc.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xmemdup.c -o pic/xmemdup.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xmemdup.c -o xmemdup.o
yes
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xstrdup.c -o pic/xstrdup.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xstrdup.c -o xstrdup.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/xstrerror.c -o pic/xstrerror.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/xstrerror.c -o xstrerror.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/insque.c -o pic/insque.o; \
else true; fi
checking for inttypes.h... gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/.
./include  -W -Wall -Wtraditional -pedantic ../../libiberty/insque.c -o insque.o

if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/mkstemps.c -o pic/mkstemps.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/mkstemps.c -o mkstemps.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/sigsetmask.c -o pic/sigsetmask.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/sigsetmask.c -o sigsetmask.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/stpcpy.c -o pic/stpcpy.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/stpcpy.c -o stpcpy.o
if [ x"" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtra
ditional -pedantic  ../../libiberty/stpncpy.c -o pic/stpncpy.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../libiberty/../include  -W -Wall -Wtradi
tional -pedantic ../../libiberty/stpncpy.c -o stpncpy.o
rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
  ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o ./choose-t
emp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./floatfor
mat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o .
/hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o .
/objalloc.o ./obstack.o ./partition.o ./physmem.o ./pex-unix.o ./safe-ctype.o ./
sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./ternary.o ./unlink
-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstre
rror.o  ./insque.o ./mkstemps.o ./sigsetmask.o ./stpcpy.o ./stpncpy.o
ranlib ./libiberty.a
yes
if [ x"" != x ]; then \
  cd pic; \
  ar rc ./libiberty.a \
    ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o ./choose
-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./floatf
ormat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o
 ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o
 ./objalloc.o ./obstack.o ./partition.o ./physmem.o ./pex-unix.o ./safe-ctype.o
./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./ternary.o ./unli
nk-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xst
rerror.o  ./insque.o ./mkstemps.o ./sigsetmask.o ./stpcpy.o ./stpncpy.o; \
  ranlib ./libiberty.a; \
  cd ..; \
else true; fi
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerro
r strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bc
mp bcopy bzero; do \
  for g in ./insque.o ./mkstemps.o ./sigsetmask.o ./stpcpy.o ./stpncpy.o ; do \
    case "$g" in \
      *$f*) echo $g >> needed-list ;; \
    esac; \
  done; \
done
checking for stdint.h... echo ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./
alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdma
tch.o ./fibheap.o ./floatformat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o
./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-p
refix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./physmem.o ./
pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strs
ignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./x
memdup.o ./xstrdup.o ./xstrerror.o > required-list
h:\pspsdk\bin\make.exe[2]: Entering directory `H:/cygwin/home/Joris/psptoolchain
/build/binutils-2.16.1/build-psp/libiberty/testsuite'
h:\pspsdk\bin\make.exe[2]: Nothing to be done for `all'.
h:\pspsdk\bin\make.exe[2]: Leaving directory `H:/cygwin/home/Joris/psptoolchain/
build/binutils-2.16.1/build-psp/libiberty/testsuite'
h:\pspsdk\bin\make.exe[1]: Leaving directory `H:/cygwin/home/Joris/psptoolchain/
build/binutils-2.16.1/build-psp/libiberty'
yes
checking for unistd.h... h:\pspsdk\bin\make.exe[1]: Entering directory `H:/cygwi
n/home/Joris/psptoolchain/build/binutils-2.16.1/build-psp/intl'
gcc -c -DLOCALEDIR=\"/home/Joris/pspdev/share/locale\" -DGNULOCALEDIR=\"/home/Jo
ris/pspdev/share/locale\" -DLOCALE_ALIAS_PATH=\"/home/Joris/pspdev/share/locale:
.\" -DHAVE_CONFIG_H -I. -I../../intl  -g -O2  ../../intl/intl-compat.c
gcc -c -DLOCALEDIR=\"/home/Joris/pspdev/share/locale\" -DGNULOCALEDIR=\"/home/Jo
ris/pspdev/share/locale\" -DLOCALE_ALIAS_PATH=\"/home/Joris/pspdev/share/locale:
.\" -DHAVE_CONFIG_H -I. -I../../intl  -g -O2  ../../intl/bindtextdom.c
gcc -c -DLOCALEDIR=\"/home/Joris/pspdev/share/locale\" -DGNULOCALEDIR=\"/home/Jo
ris/pspdev/share/locale\" -DLOCALE_ALIAS_PATH=\"/home/Joris/pspdev/share/locale:
.\" -DHAVE_CONFIG_H -I. -I../../intl  -g -O2  ../../intl/dcgettext.c
../../intl/dcgettext.c:105: error: static declaration of 'stpcpy' follows non-st
atic declaration
h:\pspsdk\bin\make.exe[1]: *** [dcgettext.o] Error 1
h:\pspsdk\bin\make.exe[1]: Leaving directory `H:/cygwin/home/Joris/psptoolchain/
build/binutils-2.16.1/build-psp/intl'
h:\pspsdk\bin\make.exe: *** [all-intl] Error 2
h:\pspsdk\bin\make.exe: *** Waiting for unfinished jobs....
yes
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking nl_types.h usability... no
checking nl_types.h presence... no
checking for nl_types.h... no
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... yes
checking for strcasecmp... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for stpcpy... no
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for gettext in libc... no
checking for bindtextdomain in -lintl... yes
checking for gettext in libintl... no
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed...  fr tr ja es sv da zh_CN ro
checking for a BSD-compatible install... /usr/bin/install -c
checking for long long... yes
checking size of long long... 8
checking size of long... 4
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for fcntl... yes
checking for getpagesize... (cached) yes
checking for setitimer... yes
checking for sysconf... yes
checking for fdopen... yes
checking for getuid... yes
checking for getgid... yes
checking for strtoull... yes
checking whether strstr must be declared... no
checking whether malloc must be declared... no
checking whether realloc must be declared... no
checking whether free must be declared... no
checking whether getenv must be declared... no
checking for gcc version with buggy 64-bit support... no
checking for ftello... yes
checking for ftello64... no
checking for fseeko... yes
checking for fseeko64... no
checking size of off_t... 8
checking file_ptr type... BFD_HOST_64_BIT
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) no
checking for madvise... no
checking for mprotect... yes
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating bfd-in3.h
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
../scripts/001-binutils-2.16.1.sh: Failed.
Seems something goes wrong here

Code: Select all

/share/locale:
.\" -DHAVE_CONFIG_H -I. -I../../intl  -g -O2  ../../intl/dcgettext.c
../../intl/dcgettext.c:105: error: static declaration of 'stpcpy' follows non-st
atic declaration
h:\pspsdk\bin\make.exe[1]: *** [dcgettext.o] Error 1
Don't know why the script goes on.

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

It goes on because it's running two threads (make -j 2).
Check the output in build/binutils-2.16.1/intl/config.log, it seems that HAVE_STPCPY wasn't defined in config.h for some reason...
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

NOTE:
I installed cygwin and the dependencies listen in the readme. nothing else.

config.log

Code: Select all

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:562: checking for a BSD compatible install
configure:616: checking how to run the C preprocessor
configure:637: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:677: checking whether make sets ${MAKE}
configure:706: checking for gcc
configure:783: checking whether the C compiler (gcc -g -O2 ) works
configure:797: gcc -o conftest -g -O2   conftest.c  1>&5
configure:817: checking whether the C compiler (gcc -g -O2 ) is a cross-compiler
configure:822: checking whether we are using GNU C
configure:831: gcc -E conftest.c
configure:846: checking whether gcc accepts -g
configure:876: checking for ranlib
configure:903: checking for POSIXized ISC
configure:924: checking for ANSI C header files
configure:937: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1004: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1028: checking for working const
configure:1082: gcc -c -g -O2  conftest.c 1>&5
configure:1103: checking for inline
configure:1117: gcc -c -g -O2  conftest.c 1>&5
configure:1143: checking for off_t
configure:1176: checking for size_t
configure:1211: checking for working alloca.h
configure:1223: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1244: checking for alloca
configure:1272: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1441: checking for unistd.h
configure:1451: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1480: checking for getpagesize
configure:1508: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1533: checking for working mmap
configure:1681: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1612: warning: conflicting types for built-in function 'malloc'
configure: failed program was:
#line 1541 "configure"
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize&#40;&#41; sysconf&#40;_SC_PAGESIZE&#41;
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize&#40;&#41; EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize&#40;&#41; NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize&#40;&#41; NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize&#40;&#41; PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize&#40;&#41; 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" &#123; void *malloc&#40;unsigned&#41;; &#125;
#else
char *malloc&#40;&#41;;
#endif

int
main&#40;&#41;
&#123;
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize&#40;&#41;;

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc&#40;pagesize&#41;;
	if &#40;!data&#41;
		exit&#40;1&#41;;
	for &#40;i = 0; i < pagesize; ++i&#41;
		*&#40;data + i&#41; = rand&#40;&#41;;
	umask&#40;0&#41;;
	fd = creat&#40;"conftestmmap", 0600&#41;;
	if &#40;fd < 0&#41;
		exit&#40;1&#41;;
	if &#40;write&#40;fd, data, pagesize&#41; != pagesize&#41;
		exit&#40;1&#41;;
	close&#40;fd&#41;;

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open&#40;"conftestmmap", O_RDWR&#41;;
	if &#40;fd < 0&#41;
		exit&#40;1&#41;;
	data2 = malloc&#40;2 * pagesize&#41;;
	if &#40;!data2&#41;
		exit&#40;1&#41;;
	data2 += &#40;pagesize - &#40;&#40;int&#41; data2 & &#40;pagesize - 1&#41;&#41;&#41; & &#40;pagesize - 1&#41;;
	if &#40;data2 != mmap&#40;data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L&#41;&#41;
		exit&#40;1&#41;;
	for &#40;i = 0; i < pagesize; ++i&#41;
		if &#40;*&#40;data + i&#41; != *&#40;data2 + i&#41;&#41;
			exit&#40;1&#41;;

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read&#40;&#41;.
	 * &#40;This is a bug on some variants of i386 svr4.0.&#41;
	 */
	for &#40;i = 0; i < pagesize; ++i&#41;
		*&#40;data2 + i&#41; = *&#40;data2 + i&#41; + 1;
	data3 = malloc&#40;pagesize&#41;;
	if &#40;!data3&#41;
		exit&#40;1&#41;;
	if &#40;read&#40;fd, data3, pagesize&#41; != pagesize&#41;
		exit&#40;1&#41;;
	for &#40;i = 0; i < pagesize; ++i&#41;
		if &#40;*&#40;data + i&#41; != *&#40;data3 + i&#41;&#41;
			exit&#40;1&#41;;
	close&#40;fd&#41;;
	unlink&#40;"conftestmmap"&#41;;
	exit&#40;0&#41;;
&#125;

configure&#58;1709&#58; checking for argz.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1709&#58; checking for limits.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1709&#58; checking for locale.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1709&#58; checking for nl_types.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1715&#58;22&#58; nl_types.h&#58; No such file or directory
configure&#58; failed program was&#58;
#line 1714 "configure"
#include "confdefs.h"
#include <nl_types.h>
configure&#58;1709&#58; checking for malloc.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1709&#58; checking for string.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1709&#58; checking for unistd.h
configure&#58;1709&#58; checking for values.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1715&#58;20&#58; values.h&#58; No such file or directory
configure&#58; failed program was&#58;
#line 1714 "configure"
#include "confdefs.h"
#include <values.h>
configure&#58;1709&#58; checking for sys/param.h
configure&#58;1719&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1749&#58; checking for getcwd
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for munmap
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for putenv
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for setenv
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for setlocale
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for strchr
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1761&#58; warning&#58; conflicting types for built-in function 'strchr'
configure&#58;1749&#58; checking for strcasecmp
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for __argz_count
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for __argz_stringify
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1749&#58; checking for __argz_next
configure&#58;1777&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1806&#58; checking for stpcpy
configure&#58;1834&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1818&#58; warning&#58; conflicting types for built-in function 'stpcpy'
/cygdrive/c/Users/Joris/AppData/Local/Temp/ccuz1qNd.o&#58; In function `main'&#58;
/home/Joris/psptoolchain/build/binutils-2.16.1/build-psp/intl/configure&#58;1828&#58; undefined reference to `_stpcpy'
collect2&#58; ld returned 1 exit status
configure&#58; failed program was&#58;
#line 1811 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char stpcpy&#40;&#41;; below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char stpcpy&#40;&#41;;

int main&#40;&#41; &#123;

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined &#40;__stub_stpcpy&#41; || defined &#40;__stub___stpcpy&#41;
choke me
#else
stpcpy&#40;&#41;;
#endif

; return 0; &#125;
configure&#58;1868&#58; checking for LC_MESSAGES
configure&#58;1880&#58; gcc -o conftest -g -O2   conftest.c  1>&5
configure&#58;1901&#58; checking whether NLS is requested
configure&#58;1921&#58; checking whether included gettext is requested
configure&#58;1940&#58; checking for libintl.h
configure&#58;1950&#58; gcc -E  conftest.c >/dev/null 2>conftest.out
configure&#58;1967&#58; checking for gettext in libc
configure&#58;1979&#58; gcc -o conftest -g -O2   conftest.c  1>&5
/cygdrive/c/Users/Joris/AppData/Local/Temp/ccaJ9ZGG.o&#58; In function `main'&#58;
/home/Joris/psptoolchain/build/binutils-2.16.1/build-psp/intl/configure&#58;1975&#58; undefined reference to `_libintl_gettext'
collect2&#58; ld returned 1 exit status
configure&#58; failed program was&#58;
#line 1972 "configure"
#include "confdefs.h"
#include <libintl.h>
int main&#40;&#41; &#123;
return &#40;int&#41; gettext &#40;""&#41;
; return 0; &#125;
configure&#58;1995&#58; checking for bindtextdomain in -lintl
configure&#58;2014&#58; gcc -o conftest -g -O2   conftest.c -lintl   1>&5
configure&#58;2030&#58; checking for gettext in libintl
configure&#58;2042&#58; gcc -o conftest -g -O2   conftest.c  1>&5
/cygdrive/c/Users/Joris/AppData/Local/Temp/ccsB6BBN.o&#58; In function `main'&#58;
/home/Joris/psptoolchain/build/binutils-2.16.1/build-psp/intl/configure&#58;2038&#58; undefined reference to `_gettext'
collect2&#58; ld returned 1 exit status
configure&#58; failed program was&#58;
#line 2035 "configure"
#include "confdefs.h"

int main&#40;&#41; &#123;
return &#40;int&#41; gettext &#40;""&#41;
; return 0; &#125;
configure&#58;2266&#58; checking for msgfmt
configure&#58;2300&#58; checking for gmsgfmt
configure&#58;2335&#58; checking for xgettext

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

I just updated it recently in Cygwin and it worked fine. Stock installation options with WGET from Web and the whole of Devel. It fails in the PSPLink script, but it always has. Just remove remotejoy from the script.
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

Why doesn't psplink compile? It worked fine about one (maybe two) year ago, doesn't it?

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Some SDLjoystick.something isn't found in Cygwin.
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

why not using heimdall port of the toolchain ;) it works on windows,linux & mac& solaris :p
http://forums.ps2dev.org/viewtopic.php? ... ws+toolkit
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

I don't like to depend on someone else work but i want to share my builds with the rest of the world. And i can compile my own libs which is sometimes not possible with heimdals SDK.

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

jojojoris wrote:I don't like to depend on someone else work but i want to share my builds with the rest of the world. And i can compile my own libs which is sometimes not possible with heimdals SDK.
You don't like to depend on others work but expect others to depend on yours? :) kind of funny philosophy...

All libs shipped with minpspw are build with minpspw, if case you need to build extra ones it is quite simple, if you just have a makefile it works (or should) out of the box, maybe you need to modify the makefile to be cross platform, most of the times makefiles rely on posix commands such as: mkdir -p, rm -Rf etc... on the other hand... if your problem is with autotools, all you need to do is install msys-1.0.11 and voilá you have a shell in order to get autotools you need to install msys-dtk-1.0.1 or if you really don't want to depend on that you can compile them yourself...
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

I don't expect other people to depend on me but i want to give them the opportunity.

I have a working environment already. I only use cygwin instead of msys.

Code: Select all

int main&#40;&#41;&#123;
     SetupCallbacks&#40;&#41;;
     makeNiceGame&#40;&#41;;
     sceKernelExitGame&#40;&#41;;
&#125;
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Just delete the whole Cygwin installation and start from scratch. Or force reinstall of everything. Remember to select the whole of devel and wget.

Manually set the Cygwin bin path in the Windows environment variables and set the PSPSDK path in the Cygwin bat file.
Post Reply