Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 12:46:02 -0400
From:      Naram Qashat <cyberbotx@cyberbotx.com>
To:        freebsd-ports@FreeBSD.org
Subject:   devel/mingw32-gcc: Attempting to update the port, can't compile it
Message-ID:  <53A4654A.6030906@cyberbotx.com>

next in thread | raw e-mail | index | archive | help
As the maintainer of devel/mingw32-gcc, it currently needs staging, but the port 
refuses to compile at the moment. The first problem I was getting was it saying 
that it couldn't find stdio.h at all.

After a bit of searching on Google, I found the --with-sysroot configure option. 
I had to patch gcc/config.gcc to use /mingw32/include instead of /mingw/include 
(since devel/mingw32-bin-msvcrt installs to ${PREFIX}/mingw32/include).

I have attempted to build the port in poudriere.

If I set --with-sysroot to ${PREFIX}, I get the following:

The directory that should contain system headers does not exist:
   /prefix/mingw32-gcc-4.8.1_1/mingw32/include
gmake[2]: *** [stmp-fixinc] Error 1
gmake[2]: Leaving directory `/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/gcc'
gmake[1]: *** [all-gcc] Error 2
gmake[1]: Leaving directory `/wrkdirs/usr/ports/devel/mingw32-gcc/work/build'
gmake: *** [all] Error 2

If I set --with-sysroot to ${LOCALBASE}, I get the following instead:

/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/./gcc/xgcc 
-B/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/./gcc/ 
-L/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/mingw32/winsup/mingw 
-L/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/mingw32/winsup/w32api/lib 
-isystem 
/wrkdirs/usr/ports/devel/mingw32-gcc/work/gcc-4.8.1/winsup/mingw/include 
-isystem 
/wrkdirs/usr/ports/devel/mingw32-gcc/work/gcc-4.8.1/winsup/w32api/include 
-B/prefix/mingw32-gcc-4.8.1_1/mingw32/bin/ 
-B/prefix/mingw32-gcc-4.8.1_1/mingw32/lib/ -isystem 
/prefix/mingw32-gcc-4.8.1_1/mingw32/include -isystem 
/prefix/mingw32-gcc-4.8.1_1/mingw32/sys-include    -g -O2 -pipe 
-I/usr/local/include -fno-strict-aliasing -O2 
-I../.././..//gcc-4.8.1/libgcc/../winsup/w32api/include -g -O2 -pipe 
-I/usr/local/include -fno-strict-aliasing -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE 
-W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc 
-fno-stack-protector   -I. -I. -I../.././gcc -I../.././..//gcc-4.8.1/libgcc 
-I../.././..//gcc-4.8.1/libgcc/. -I../.././..//gcc-4.8.1/libgcc/../gcc 
-I../.././..//gcc-4.8.1/libgcc/../include 
-I../.././..//gcc-4.8.1/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT 
-DHAVE_CC_TLS -DUSE_EMUTLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep 
-DL_muldi3 -c ../.././..//gcc-4.8.1/libgcc/libgcc2.c
In file included from ../.././..//gcc-4.8.1/libgcc/libgcc2.c:27:0:
../.././..//gcc-4.8.1/libgcc/../gcc/tsystem.h:87:19: fatal error: stdio.h: No 
such file or directory
  #include <stdio.h>
                    ^
compilation terminated.
gmake[2]: *** [_muldi3.o] Error 1
gmake[2]: Leaving directory 
`/wrkdirs/usr/ports/devel/mingw32-gcc/work/build/mingw32/libgcc'
gmake[1]: *** [all-target-libgcc] Error 2
gmake[1]: Leaving directory `/wrkdirs/usr/ports/devel/mingw32-gcc/work/build'
gmake: *** [all] Error 2

I'm at a complete loss as to how to fix this. I am hoping that someone more 
versed in cross-compiling gcc can help me solve this, so I can get the port 
updated and staged before the end of the month.

Thanks,
Naram Qashat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A4654A.6030906>