Hi folks,
I'm currently trying to build gpc-20030830 on Windows XP with mingw. After unpacking, copying and `configure --enable-languages=pascal`ing, `make` aborts with the error message:
make[1]: Circular libgcc.a <- pascal dependency dropped. In file included from config/i386/mingw32.h:31, from tconfig.h:16, from libgcc2.c:36: config/i386/cygwin.h:31:19: stdio.h: No such file or directory In file included from config/i386/mingw32.h:31, from tconfig.h:16, from libgcc2.c:36: config/i386/cygwin.h:447: parse error before '*' token config/i386/cygwin.h:447: warning: function declaration isn't a prototype config/i386/cygwin.h:449: parse error before '*' token config/i386/cygwin.h:449: warning: function declaration isn't a prototype In file included from libgcc2.c:37: tsystem.h:63:19: stdio.h: No such file or directory tsystem.h:66:23: sys/types.h: No such file or directory tsystem.h:69:19: errno.h: No such file or directory tsystem.h:76:20: string.h: No such file or directory tsystem.h:80:20: stdlib.h: No such file or directory tsystem.h:81:20: unistd.h: No such file or directory In file included from C:/msys/1.0/mysoftware/gcc-3.2.1/gcc/include/limits.h:132, from C:/msys/1.0/mysoftware/gcc-3.2.1/gcc/include/syslimits.h:7, from C:/msys/1.0/mysoftware/gcc-3.2.1/gcc/include/limits.h:11, from tsystem.h:84, from libgcc2.c:37: include/limits.h:132:75: limits.h: No such file or directory In file included from libgcc2.c:37: tsystem.h:87:18: time.h: No such file or directory make[2]: *** [libgcc/./_muldi3.o] Error 1 make[1]: *** [libgcc.a] Error 2 make: *** [all-gcc] Error 2
After in the Makefile.in I added -I$(srcdir)/fixinc/tests/base to the include path, only this error message remained:
rm: `include' is a directory rm: `include' is a directory config.h is unchanged hconfig.h is unchanged tm_p.h is unchanged In file included from config/i386/mingw32.h:31, from config.h:18, from cppdefault.c:25: config/i386/cygwin.h:447: parse error before '*' token config/i386/cygwin.h:447: warning: function declaration isn't a prototype config/i386/cygwin.h:449: parse error before '*' token config/i386/cygwin.h:449: warning: function declaration isn't a prototype make[1]: *** [cppdefault.o] Error 1 make: *** [all-gcc] Error 2
These lines in the source refer to a macro(?) named FILE that seemingly isn't defined anywhere.
Does anyone have an idea what I'm doing wrong? -- My MinGW installation directory is just C:\MinGW, so all of the important system headers should be found in C:\MinGW\include. I'm compiling from within my msys directory tree, which is situated at C:\msys\1.0.
Any ideas will be welcome.
Thanks in advance,
Markus
Markus Gerwinski wrote:
tsystem.h:63:19: stdio.h: No such file or directory tsystem.h:66:23: sys/types.h: No such file or directory tsystem.h:69:19: errno.h: No such file or directory tsystem.h:76:20: string.h: No such file or directory tsystem.h:80:20: stdlib.h: No such file or directory tsystem.h:81:20: unistd.h: No such file or directory include/limits.h:132:75: limits.h: No such file or directory
After in the Makefile.in I added -I$(srcdir)/fixinc/tests/base to the include path, only this error message remained:
I don't know Mingw myself, but this path looks strange (tests!?). Are you sure this is the actual locations of standard C headers such as stdio.h etc. (and not just some -- test? -- files that happen to use the same names for whichever reason)?
Does anyone have an idea what I'm doing wrong? -- My MinGW installation directory is just C:\MinGW, so all of the important system headers should be found in C:\MinGW\include.
Did you try adding this directory to the include path?
Frank
Frank Heckenbach wrote:
After in the Makefile.in I added -I$(srcdir)/fixinc/tests/base to the include path, only this error message remained:
I don't know Mingw myself, but this path looks strange (tests!?).
Thought so myself. However, this didn't seem to be mingw-specific, but rather gcc-specific.
Are you sure this is the actual locations of standard C headers such as stdio.h etc. (and not just some -- test? -- files that happen to use the same names for whichever reason)?
Not really, but why did the egcs team add that strange path to the gcc-distro if it wasn't for actual use?
Does anyone have an idea what I'm doing wrong? -- My MinGW installation directory is just C:\MinGW, so all of the important system headers should be found in C:\MinGW\include.
Did you try adding this directory to the include path?
Silly me, no. #-) Okay, after I did so, the build went without problems. Now I get completely another error message:
make[1]: Circular libgcc.a <- pascal dependency dropped. configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Error 1 make: *** [all-gcc] Error 2
What's that?
Markus Gerwinski wrote:
Are you sure this is the actual locations of standard C headers such as stdio.h etc. (and not just some -- test? -- files that happen to use the same names for whichever reason)?
Not really, but why did the egcs team add that strange path to the gcc-distro if it wasn't for actual use?
Don't ask me ... ;-)
Silly me, no. #-) Okay, after I did so, the build went without problems. Now I get completely another error message:
make[1]: Circular libgcc.a <- pascal dependency dropped.
This one is harmless.
configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Error 1 make: *** [all-gcc] Error 2
What's that?
Either the compiler wasn't built correctly, or the configure script doesn't recognize it. Perhaps it's a trivial thing such as file name suffix, but I suppose The Chief can help better here ...
Frank
On 3 Apr 2004 at 16:20, Frank Heckenbach wrote:
Markus Gerwinski wrote:
[...]
configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Error 1 make: *** [all-gcc] Error 2
What's that?
Either the compiler wasn't built correctly, or the configure script doesn't recognize it. Perhaps it's a trivial thing such as file name suffix, but I suppose The Chief can help better here ...
You get this when the newly-built compiler cannot find its include files or libraries or whatever. The easiest way to avoid this is to set up the environment properly. I have something like this in my $HOME/.profile
if [ $MSYSTEM == MINGW32 ]; then export C_INCLUDE_PATH=/mingw/include export LIBRARY_PATH=/mingw/lib export CC=gcc.exe export PS1='(Mingw)$PWD $' else export C_INCLUDE_PATH=/usr/include export LIBRARY_PATH=/usr/lib export CC=i686-pc-msys-gcc.exe export PS1='(MSYS)$PWD $' fi
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Error 1 make: *** [all-gcc] Error 2
You get this when the newly-built compiler cannot find its include files or libraries or whatever. The easiest way to avoid this is to set up the environment properly. I have something like this in my $HOME/.profile
if [ $MSYSTEM == MINGW32 ]; then export C_INCLUDE_PATH=/mingw/include export LIBRARY_PATH=/mingw/lib export CC=gcc.exe export PS1='(Mingw)$PWD $' else export C_INCLUDE_PATH=/usr/include export LIBRARY_PATH=/usr/lib export CC=i686-pc-msys-gcc.exe export PS1='(MSYS)$PWD $' fi
Okay, I set up these variables in my MinGW too, and it seems to get something working. However, I still get this one:
make[1]: Circular libgcc.a <- pascal dependency dropped. ...../libgpc.a(rts.o)(.text+0xf0d):rts.c: undefined reference to `readdir' ...../libgpc.a(rts.o)(.text+0xef1):rts.c: undefined reference to `opendir' ...../libgpc.a(rts.o)(.text+0xf2c):rts.c: undefined reference to `closedir' make[2]: *** [binobj.exe] Error 1 make[1]: *** [pascal.utils] Error 2 make: *** [all-gcc] Error 2
What could be wrong here?
Hi folks,
does anyone here know how to build a libncurses and a libpanel for mingw? When trying to build a gpc program that uses crt, I'm getting a lot of undefined references now.
To fix them, I downloaded a ncurses-1.5 tarball. Trying to build it resulted in a bunch of error messages:
In file included from c:/MinGW/include/sys/ioctl.h:22, from ../include/term.h:133, from ../ncurses/curses.priv.h:258, from tinfo/comp_hash.c:40: c:/MinGW/include/features.h:283:25: sys/cdefs.h: No such file or directory c:/MinGW/include/features.h:312:24: gnu/stubs.h: No such file or directory In file included from c:/MinGW/include/sys/ioctl.h:30, from ../include/term.h:133, from ../ncurses/curses.priv.h:258, from tinfo/comp_hash.c:40: c:/MinGW/include/bits/ioctl-types.h:28: syntax error before "struct" In file included from ../include/term.h:133, from ../ncurses/curses.priv.h:258, from tinfo/comp_hash.c:40: c:/MinGW/include/sys/ioctl.h:42: parse error before "__THROW" In file included from ../ncurses/curses.priv.h:258, from tinfo/comp_hash.c:40: ../include/term.h:673: syntax error before "typedef" ../include/term.h:698: field `Ottyb' has incomplete type ../include/term.h:699: field `Nttyb' has incomplete type make[1]: *** [make_hash] Error 1 make: *** [all] Error 2
Since they seem to refer to non-existing files: Is there some kind of "mingw special" ncurses distribution I would have to use instead?
Thanks in advance,
Markus
On 3 Apr 2004 at 19:17, Markus Gerwinski wrote:
Hi folks,
does anyone here know how to build a libncurses and a libpanel for mingw? When trying to build a gpc program that uses crt, I'm getting a lot of undefined references now.
[...]
I doubt that you will ever get ncurses to compile for Mingw. PDCurses compiles ok and can be used. You might need to make some changes to some of the sources, but, IIRC, it isn't too difficult. That is what I use for Crt.
I could release a binary package if there is interest.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
On 3 Apr 2004 at 15:52, Markus Gerwinski wrote:
Hi folks,
I'm currently trying to build gpc-20030830 on Windows XP with mingw. After unpacking, copying and `configure --enable-languages=pascal`ing, `make` aborts with the error message:
make[1]: Circular libgcc.a <- pascal dependency dropped. In file included from config/i386/mingw32.h:31, from tconfig.h:16, from libgcc2.c:36: config/i386/cygwin.h:31:19: stdio.h: No such file or directory
[...]
I don't remember ever seeing these errors. What version of gcc sources are you building on?
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
make[1]: Circular libgcc.a <- pascal dependency dropped. In file included from config/i386/mingw32.h:31, from tconfig.h:16, from libgcc2.c:36: config/i386/cygwin.h:31:19: stdio.h: No such file or directory
[...]
I don't remember ever seeing these errors. What version of gcc sources are you building on?
The ones from gcc-core-3.2.1.tar.gz.
On 3 Apr 2004 at 16:21, Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
make[1]: Circular libgcc.a <- pascal dependency dropped. In file included from config/i386/mingw32.h:31, from tconfig.h:16, from libgcc2.c:36: config/i386/cygwin.h:31:19: stdio.h: No such file or directory
[...]
I don't remember ever seeing these errors. What version of gcc sources are you building on?
The ones from gcc-core-3.2.1.tar.gz.
That should be (mostly) fine. I prefer to use the "mingw special" versions of the gcc sources (i.e., the ones available from the Mingw download site), because they have been patched for Mingw use. What arguments do you pass to "configure"? I would advise passing the same ones (except the enable-languages one) that were passed to gcc when building it. If you run "gcc -v", you will see what they are. Also, you need to be sure that you are building for Mingw target, and not for MSYS target.
Attached is a copy of the shell script that I use to build GPC for Mingw (I have commented out other things that I do).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.
---- File information ----------- File: gpc_mingw_build.sh Date: 3 Apr 2004, 15:37 Size: 726 bytes. Type: Unknown
Prof A Olowofoyeku (The African Chief) wrote:
I don't remember ever seeing these errors. What version of gcc sources are you building on?
The ones from gcc-core-3.2.1.tar.gz.
That should be (mostly) fine. I prefer to use the "mingw special" versions of the gcc sources (i.e., the ones available from the Mingw download site), because they have been patched for Mingw use.
Good to know...
What arguments do you pass to "configure"?
Only "--enable-languages=pascal".
Attached is a copy of the shell script that I use to build GPC for Mingw (I have commented out other things that I do).
Thanks. It seemingly gets another step further: Now `make` aborts with the error message
make[1]: Circular libgcc.a <- pascal dependency dropped. ...../libgpc.a(rts.o)(.text+0xf0d):rts.c: undefined reference to `readdir' ...../libgpc.a(rts.o)(.text+0xef1):rts.c: undefined reference to `opendir' ...../libgpc.a(rts.o)(.text+0xf2c):rts.c: undefined reference to `closedir' make[2]: *** [binobj.exe] Error 1 make[1]: *** [pascal.utils] Error 2 make: *** [all-gcc] Error 2
What now?
Best,
Markus
On 3 Apr 2004 at 17:12, Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
I don't remember ever seeing these errors. What version of gcc sources are you building on?
The ones from gcc-core-3.2.1.tar.gz.
That should be (mostly) fine. I prefer to use the "mingw special" versions of the gcc sources (i.e., the ones available from the Mingw download site), because they have been patched for Mingw use.
Good to know...
What arguments do you pass to "configure"?
Only "--enable-languages=pascal".
Attached is a copy of the shell script that I use to build GPC for Mingw (I have commented out other things that I do).
Thanks. It seemingly gets another step further: Now `make` aborts with the error message
make[1]: Circular libgcc.a <- pascal dependency dropped. ...../libgpc.a(rts.o)(.text+0xf0d):rts.c: undefined reference to `readdir' ...../libgpc.a(rts.o)(.text+0xef1):rts.c: undefined reference to `opendir' ...../libgpc.a(rts.o)(.text+0xf2c):rts.c: undefined reference to `closedir' make[2]: *** [binobj.exe] Error 1 make[1]: *** [pascal.utils] Error 2 make: *** [all-gcc] Error 2
What now?
If you got to that point, it means that the compiler and runtime system have been built successfully. It also probably proves that you don't have a "Mingw special" source tarball. You need to patch your gcc/config/i386/mingw32.h. Check that file for this:
/* Include in the mingw32 libraries with libgcc */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem. You can achieve the same result by passing "-lmingwex" at the command line - but really this should be in the SPECS file - and patching mingw32.h as above is how to get it there each time you rebuild the compiler.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
If you got to that point, it means that the compiler and runtime system have been built successfully. It also probably proves that you don't have a "Mingw special" source tarball. You need to patch your gcc/config/i386/mingw32.h. Check that file for this:
/* Include in the mingw32 libraries with libgcc */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem.
It did. I finally got my gpc compiled. :-)
I'll give it a try with the pre-patched mingw version next time.
Thank you very much,
Markus
On 3 Apr 2004 at 18:47, Markus Gerwinski wrote:
[...]
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem.
It did. I finally got my gpc compiled. :-)
Excellent!
I'll give it a try with the pre-patched mingw version next time.
Note that if you want your gpc driver to behave correctly under Windows 9x, you might need to edit gcc/config/i386/xm-mingw32.h as follows:
#define DIR_SEPARATOR '\' #define DIR_SEPARATOR_2 '/'
For NT/Win2k/XP and beyond, you don't need to do that.
Thank you very much,
No sweat ;)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Hi Folks,
Prof A Olowofoyeku (The African Chief) wrote:
Note that if you want your gpc driver to behave correctly under Windows 9x, you might need to edit gcc/config/i386/xm-mingw32.h as follows:
#define DIR_SEPARATOR '\' #define DIR_SEPARATOR_2 '/'
For NT/Win2k/XP and beyond, you don't need to do that.
I see. Is there a way to determine which Windows dialect I'm working on from within a configure.ac file?
I doubt that you will ever get ncurses to compile for Mingw. PDCurses compiles ok and can be used. You might need to make some changes to some of the sources, but, IIRC, it isn't too difficult. That is what I use for Crt.
I could release a binary package if there is interest.
Already got a pdcurses binary from www.mingw.org, thanks. Everything's running fine now. After playing with my own configure.ac and Makefile.am a bit, I didn't even have to change my Pascal sources. :-)
Thanks again,
Markus
On 3 Apr 2004 at 22:36, Markus Gerwinski wrote:
Hi Folks,
Prof A Olowofoyeku (The African Chief) wrote:
Note that if you want your gpc driver to behave correctly under Windows 9x, you might need to edit gcc/config/i386/xm-mingw32.h as follows:
#define DIR_SEPARATOR '\' #define DIR_SEPARATOR_2 '/'
For NT/Win2k/XP and beyond, you don't need to do that.
I see. Is there a way to determine which Windows dialect I'm working on from within a configure.ac file?
Not that I know of. The problem is more than that. I work with XP but people who download the binaries that I release might be using Win9x. So I just now make the amendments referred to above. It doesn't hurt NT/Win2k/XP - and it prevents problems under Win9x.
I doubt that you will ever get ncurses to compile for Mingw. PDCurses compiles ok and can be used. You might need to make some changes to some of the sources, but, IIRC, it isn't too difficult. That is what I use for Crt.
I could release a binary package if there is interest.
Already got a pdcurses binary from www.mingw.org, thanks. Everything's running fine now. After playing with my own configure.ac and Makefile.am a bit, I didn't even have to change my Pascal sources. :-)
Excellent!
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem.
It did. I finally got my gpc compiled. :-)
BTW, some time ago there was an "initiative" to update the installation instructions in the manual. AFAICS, nothing's come out of it. Perhaps one of you wants to improve the documentation?
Frank
On 3 Apr 2004 at 19:33, Frank Heckenbach wrote:
Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem.
It did. I finally got my gpc compiled. :-)
BTW, some time ago there was an "initiative" to update the installation instructions in the manual. AFAICS, nothing's come out of it. Perhaps one of you wants to improve the documentation?
I am happy to help - if it doesn't involve learning another language (e.g., texi or whatever the manual is written in ...).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
On 3 Apr 2004 at 19:33, Frank Heckenbach wrote:
Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem.
It did. I finally got my gpc compiled. :-)
BTW, some time ago there was an "initiative" to update the installation instructions in the manual. AFAICS, nothing's come out of it. Perhaps one of you wants to improve the documentation?
I am happy to help - if it doesn't involve learning another language (e.g., texi or whatever the manual is written in ...).
Perhaps you can team up with Markus or soemone who can care about the formatting while you can concentrate on the contents?
Frank
Frank Heckenbach wrote:
BTW, some time ago there was an "initiative" to update the installation instructions in the manual. AFAICS, nothing's come out of it. Perhaps one of you wants to improve the documentation?
I am happy to help - if it doesn't involve learning another language (e.g., texi or whatever the manual is written in ...).
Perhaps you can team up with Markus or soemone who can care about the formatting while you can concentrate on the contents?
I don't speak texi myself, if that's required for formatting... I always mean to learn it, but for now I wouldn't be much of a help with it.