Re: [Tinycc-devel] Running 'make test' on windows?
Le vendredi 7 février 2014, 11:39:51 grischka a écrit : > > Maybe I'd then go rather along your original idea, that is to > fight tne bug with some "counter-bug", for example intentionally > mis-spelling the word "version" in the input (versio, verssion, ...). > Plus a short comment in the commit message. I prefer the fix Austin went with because it avoids a problem if a user has a file with the wong name to run into the problem. Indeed, if we rename the file to avoid the bug a user could still run into it and be confused by it. This way we make sure we'll never have any user complaining on the mailing list because of a strange behavior. Best regards, Thomas ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
FYI, I verified this on MSVC: > call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" Setting environment for using Microsoft Visual Studio 2010 x86 tools. Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe" conftest.c Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. /out:conftest.exe conftest.obj > dir 02/08/2014 10:33 PM 6 VERSION 02/08/2014 10:33 PM 246 conftest.c 02/08/2014 10:33 PM 8,009 conftest 02/08/2014 10:33 PM 737 conftest.obj 02/08/2014 10:33 PM45,056 conftest.exe > conftest.exe v v > conftest.exe version v > conftest.exe m m > conftest.exe minor m Pushed it here: http://repo.or.cz/w/tinycc.git/commit/497f9393e00748b8a592a486d3f5695bcd75ec57 On Fri, Feb 7, 2014 at 2:39 AM, grischka wrote: > Austin English wrote: > >> Sorry, was that 'Ok' to commit? >> > > Well, I meant workarounds can be ok if at least we know what > the bug is. > > On the other hand the bug isn't THAT great that we need to > document it forever in our sources. > > Maybe I'd then go rather along your original idea, that is to > fight tne bug with some "counter-bug", for example intentionally > mis-spelling the word "version" in the input (versio, verssion, ...). > Plus a short comment in the commit message. > > But really it is up to your preference (technically, aesthetically, > spiritually, ...) what you do. > > Thanks, > > --- grischka > > > -Austin >> On Wed, Feb 5, 2014 at 2:36 AM, grischka wrote: >> >> Austin English wrote: >>> >>> It's an issue with globbing, see https://sourceforge.net/p/ mingw/bugs/2062/ Wow, great bug. >>> >>> There's a workaround: >>> Ok. >>> >>> >>> --- grischka >>> >>> > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Austin English wrote: Sorry, was that 'Ok' to commit? Well, I meant workarounds can be ok if at least we know what the bug is. On the other hand the bug isn't THAT great that we need to document it forever in our sources. Maybe I'd then go rather along your original idea, that is to fight tne bug with some "counter-bug", for example intentionally mis-spelling the word "version" in the input (versio, verssion, ...). Plus a short comment in the commit message. But really it is up to your preference (technically, aesthetically, spiritually, ...) what you do. Thanks, --- grischka -Austin On Wed, Feb 5, 2014 at 2:36 AM, grischka wrote: Austin English wrote: It's an issue with globbing, see https://sourceforge.net/p/ mingw/bugs/2062/ Wow, great bug. There's a workaround: Ok. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Sorry, was that 'Ok' to commit? -Austin On Wed, Feb 5, 2014 at 2:36 AM, grischka wrote: > Austin English wrote: > >> It's an issue with globbing, see https://sourceforge.net/p/ >> mingw/bugs/2062/ >> > > Wow, great bug. > > There's a workaround: >> > > Ok. > > > --- grischka > > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Austin English wrote: It's an issue with globbing, see https://sourceforge.net/p/mingw/bugs/2062/ Wow, great bug. There's a workaround: Ok. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
It's an issue with globbing, see https://sourceforge.net/p/mingw/bugs/2062/ There's a workaround: diff --git a/conftest.c b/conftest.c index 53c181c..18d763c 100644 --- a/conftest.c +++ b/conftest.c @@ -37,6 +37,10 @@ # define TRIPLET TRIPLET_ARCH "-" TRIPLET_OS "-" TRIPLET_ABI #endif +#if defined(_WIN32) +int _CRT_glob = 0; /* See https://sourceforge.net/p/mingw/bugs/2062/ */ +#endif + int main(int argc, char *argv[]) { switch(argc == 2 ? argv[1][0] : 0) { I can push to mob, if that is acceptable. On Mon, Feb 3, 2014 at 9:29 PM, Austin English wrote: > Reported to MinGW: > http://sourceforge.net/p/mingw/bugs/2182/ > > > On Thu, Jan 23, 2014 at 6:07 PM, grischka wrote: > >> Austin English wrote: >> >>> It fails with gcc-4.8.1, gcc-4.7.2 and gcc-4.6.2 I also tried gcc-4.5.2, >>> but that failed to compile at all. >>> >> >> Here using gcc-4.7.2, shell from git, no AV, works. >> >> >> --- grischka >> >> >> ___ >> Tinycc-devel mailing list >> Tinycc-devel@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/tinycc-devel >> > > > > -- > -Austin > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Reported to MinGW: http://sourceforge.net/p/mingw/bugs/2182/ On Thu, Jan 23, 2014 at 6:07 PM, grischka wrote: > Austin English wrote: > >> It fails with gcc-4.8.1, gcc-4.7.2 and gcc-4.6.2 I also tried gcc-4.5.2, >> but that failed to compile at all. >> > > Here using gcc-4.7.2, shell from git, no AV, works. > > > --- grischka > > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Austin English wrote: It fails with gcc-4.8.1, gcc-4.7.2 and gcc-4.6.2 I also tried gcc-4.5.2, but that failed to compile at all. Here using gcc-4.7.2, shell from git, no AV, works. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
It fails with gcc-4.8.1, gcc-4.7.2 and gcc-4.6.2 I also tried gcc-4.5.2, but that failed to compile at all. On Thu, Jan 23, 2014 at 6:01 AM, grischka wrote: > Austin English wrote: > >> -gcc_major="$($CONFTEST version)" >> -gcc_minor="$($CONFTEST minor)" >> +gcc_major="$($CONFTEST v)" >> +gcc_minor="$($CONFTEST m)" >> >> it could be a gcc/mingw regression. This is gcc-4.8.1 (I haven't tried >> other versions though). >> >> Would you like me to push that to mob? >> > > Well, if with "./conftest version" argv[1] is "version" and > argc == 2 but > switch(argc == 2 ? argv[1][0] : 0) { > doesn't trigger > case 'v': > then it looks like a compiler bug. > > Otherwise if argv[1] is not "version" or argc != 2 it could be a > bug in the mingw startup code or some virus scanner interference > with the msys shell (cygwin->BLODA). > > Otherwise if the machine starts making inexplicable assumptions > about the difference between "version" and "v" on that level > I'd seriously suspect that it was infected by google. (A joke) > > Anyway I'd personally not do anything with any code before I knew > what's wrong with my compilation environment here. > > > --- grischka > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Austin English wrote: -gcc_major="$($CONFTEST version)" -gcc_minor="$($CONFTEST minor)" +gcc_major="$($CONFTEST v)" +gcc_minor="$($CONFTEST m)" it could be a gcc/mingw regression. This is gcc-4.8.1 (I haven't tried other versions though). Would you like me to push that to mob? Well, if with "./conftest version" argv[1] is "version" and argc == 2 but switch(argc == 2 ? argv[1][0] : 0) { doesn't trigger case 'v': then it looks like a compiler bug. Otherwise if argv[1] is not "version" or argc != 2 it could be a bug in the mingw startup code or some virus scanner interference with the msys shell (cygwin->BLODA). Otherwise if the machine starts making inexplicable assumptions about the difference between "version" and "v" on that level I'd seriously suspect that it was infected by google. (A joke) Anyway I'd personally not do anything with any code before I knew what's wrong with my compilation environment here. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Of course! I did not mean any complaint, I was simply saying that I tested a release version since I suspected it would be stable and not likely to be broken from a recent regression like trunk might be. I'll be sure to test when it comes around :). Thanks for all your hard work! On Wed, Jan 22, 2014 at 3:09 PM, Thomas Preud'homme wrote: > Le mercredi 22 janvier 2014, 04:18:53 Austin English a écrit : > > With commit 32a4962593d6a2006cdd725480124717e7f5377d, it builds and make > > test runs. There is an error: > > gcc -o tcctest.gcc tcctest.c -I.. -I.. -w -Wall -g -O2 > > -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare > -Wno-unused-result > > -DTCC_TARGET_I386 -DTCC_TARGET_PE -std=gnu99 -O0 -fno-omit-frame-pointer > > tcctest.c:6:15: error: operator '>=' has no left operand > > #if GCC_MAJOR >= 3 > >^ > > tcctest.c: In function 'builtin_test': > > tcctest.c:2467:15: error: operator '>=' has no left operand > > return (to); > >^ > > make[1]: *** [test.ref] Error 1 > > > > make -k otherwise looks good, thanks. > > > > P.S. I had actually originally tested against 0.9.26, not HEAD. I > assumed a > > release had a better chance of reliably passing 'make test'. Maybe a goal > > for 0.9.27? ;) > > I definitely hope that 0.9.27 will work better and more tests will pass. > We all > worked hard for this. I myself focused on ARM as it's what I know best but > others have worked on it as well. However we need testers to try all > possible > configurations so when we'll do the call for testing you are more than > welcome > to report tests that fail. > > Best regards, > > Thomas > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
conftest.exe is built, it fails for 'version' though: + CONFTEST=./conftest.exe + test -z '' + gcc -o ./conftest.exe /c/Users/austin/Documents/tinycc/conftest.c ++ ./conftest.exe bigendian + bigendian=no ++ ./conftest.exe version + gcc_major= ++ ./conftest.exe minor + gcc_minor=8 + test yes = no a simple patch fixes it: diff --git a/configure b/configure index 8c44e5c..c05315f 100755 --- a/configure +++ b/configure @@ -299,8 +299,8 @@ if test -z "$cross_prefix" ; then echo "configure: error: '$cc' failed to compile conftest.c." else bigendian="$($CONFTEST bigendian)" -gcc_major="$($CONFTEST version)" -gcc_minor="$($CONFTEST minor)" +gcc_major="$($CONFTEST v)" +gcc_minor="$($CONFTEST m)" if test "$mingw32" = "no" ; then triplet="$($CONFTEST triplet)" if test -f "/usr/lib/$triplet/crti.o" ; then it could be a gcc/mingw regression. This is gcc-4.8.1 (I haven't tried other versions though). After that, all tests pass with HEAD (32af4962). Would you like me to push that to mob? On Wed, Jan 22, 2014 at 8:40 AM, grischka wrote: > Austin English wrote: > >> tcctest.c:6:15: error: operator '>=' has no left operand >> #if GCC_MAJOR >= 3 >> > > Check how it comes that conftest(.exe) is not built or gcc_major > is not set from configure, lines 295-304. > > --- grischka > > > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Le mercredi 22 janvier 2014, 04:18:53 Austin English a écrit : > With commit 32a4962593d6a2006cdd725480124717e7f5377d, it builds and make > test runs. There is an error: > gcc -o tcctest.gcc tcctest.c -I.. -I.. -w -Wall -g -O2 > -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result > -DTCC_TARGET_I386 -DTCC_TARGET_PE -std=gnu99 -O0 -fno-omit-frame-pointer > tcctest.c:6:15: error: operator '>=' has no left operand > #if GCC_MAJOR >= 3 >^ > tcctest.c: In function 'builtin_test': > tcctest.c:2467:15: error: operator '>=' has no left operand > return (to); >^ > make[1]: *** [test.ref] Error 1 > > make -k otherwise looks good, thanks. > > P.S. I had actually originally tested against 0.9.26, not HEAD. I assumed a > release had a better chance of reliably passing 'make test'. Maybe a goal > for 0.9.27? ;) I definitely hope that 0.9.27 will work better and more tests will pass. We all worked hard for this. I myself focused on ARM as it's what I know best but others have worked on it as well. However we need testers to try all possible configurations so when we'll do the call for testing you are more than welcome to report tests that fail. Best regards, Thomas ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Austin English wrote: tcctest.c:6:15: error: operator '>=' has no left operand #if GCC_MAJOR >= 3 Check how it comes that conftest(.exe) is not built or gcc_major is not set from configure, lines 295-304. --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
With commit 32a4962593d6a2006cdd725480124717e7f5377d, it builds and make test runs. There is an error: gcc -o tcctest.gcc tcctest.c -I.. -I.. -w -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -DTCC_TARGET_I386 -DTCC_TARGET_PE -std=gnu99 -O0 -fno-omit-frame-pointer tcctest.c:6:15: error: operator '>=' has no left operand #if GCC_MAJOR >= 3 ^ tcctest.c: In function 'builtin_test': tcctest.c:2467:15: error: operator '>=' has no left operand return (to); ^ make[1]: *** [test.ref] Error 1 make -k otherwise looks good, thanks. P.S. I had actually originally tested against 0.9.26, not HEAD. I assumed a release had a better chance of reliably passing 'make test'. Maybe a goal for 0.9.27? ;) On Tue, Jan 21, 2014 at 10:36 AM, Thomas Preud'homme wrote: > Le lundi 20 janvier 2014, 16:44:13 Austin English a écrit : > > Howdy, > > > > I can't seem to find how to run the test suite on a windows mingw build. > > Running 'make' works fine, but 'make test' fails every time: > > make -C tests test > > make[1]: Entering directory `/c/tcc-0.9.26/tests' > > hello-exe > > ../tcc -B../win32 -I../include -L.. ../examples/ex1.c -o hello.exe || > > (../tcc -vv; exit 1) && ./hello.exe > > Hello World > > hello-run > > ../tcc -B../win32 -I../include -L.. -run ../examples/ex1.c > > Hello World > > libtest > > ./libtcc_test.exe lib_path=.. > > tcc: error: cannot find library: libtcc1.a > > tcc: error: undefined symbol 'printf' > > make[1]: *** [libtest] Error 1 > > make[1]: Leaving directory `/c/tcc-0.9.26/tests' > > make: *** [test] Error 2 > > > > I already searched the archive for 'windows tests', and checked win32/, > but > > haven't seen the answer. > > I think grischka may have fixed the issue. if not, can you remove > libtcc_test.exe and then run make test and post me the output? > > Best regards, > > Thomas > > ___ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > -- -Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Le lundi 20 janvier 2014, 16:44:13 Austin English a écrit : > Howdy, > > I can't seem to find how to run the test suite on a windows mingw build. > Running 'make' works fine, but 'make test' fails every time: > make -C tests test > make[1]: Entering directory `/c/tcc-0.9.26/tests' > hello-exe > ../tcc -B../win32 -I../include -L.. ../examples/ex1.c -o hello.exe || > (../tcc -vv; exit 1) && ./hello.exe > Hello World > hello-run > ../tcc -B../win32 -I../include -L.. -run ../examples/ex1.c > Hello World > libtest > ./libtcc_test.exe lib_path=.. > tcc: error: cannot find library: libtcc1.a > tcc: error: undefined symbol 'printf' > make[1]: *** [libtest] Error 1 > make[1]: Leaving directory `/c/tcc-0.9.26/tests' > make: *** [test] Error 2 > > I already searched the archive for 'windows tests', and checked win32/, but > haven't seen the answer. I think grischka may have fixed the issue. if not, can you remove libtcc_test.exe and then run make test and post me the output? Best regards, Thomas ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] Running 'make test' on windows?
Le lundi 20 janvier 2014, 16:44:13 Austin English a écrit : > Howdy, > > I can't seem to find how to run the test suite on a windows mingw build. > Running 'make' works fine, but 'make test' fails every time: > make -C tests test > make[1]: Entering directory `/c/tcc-0.9.26/tests' > hello-exe > ../tcc -B../win32 -I../include -L.. ../examples/ex1.c -o hello.exe || > (../tcc -vv; exit 1) && ./hello.exe > Hello World > hello-run > ../tcc -B../win32 -I../include -L.. -run ../examples/ex1.c > Hello World > libtest > ./libtcc_test.exe lib_path=.. > tcc: error: cannot find library: libtcc1.a > tcc: error: undefined symbol 'printf' > make[1]: *** [libtest] Error 1 > make[1]: Leaving directory `/c/tcc-0.9.26/tests' > make: *** [test] Error 2 > > I already searched the archive for 'windows tests', and checked win32/, but > haven't seen the answer. My bad, it must be a commit of mine that made this. i'll fix it asap. > > Thanks in advance, > Austin Thomas ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] Running 'make test' on windows?
Howdy, I can't seem to find how to run the test suite on a windows mingw build. Running 'make' works fine, but 'make test' fails every time: make -C tests test make[1]: Entering directory `/c/tcc-0.9.26/tests' hello-exe ../tcc -B../win32 -I../include -L.. ../examples/ex1.c -o hello.exe || (../tcc -vv; exit 1) && ./hello.exe Hello World hello-run ../tcc -B../win32 -I../include -L.. -run ../examples/ex1.c Hello World libtest ./libtcc_test.exe lib_path=.. tcc: error: cannot find library: libtcc1.a tcc: error: undefined symbol 'printf' make[1]: *** [libtest] Error 1 make[1]: Leaving directory `/c/tcc-0.9.26/tests' make: *** [test] Error 2 I already searched the archive for 'windows tests', and checked win32/, but haven't seen the answer. Thanks in advance, Austin ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel