From: Montenegro, H. <hor...@un...> - 2002-10-24 14:43:38
|
Hi, I have tried to compile source-highlight 1.6 with both Cygwin and MSYS. It compiled sucessfullt with Cygwin/gcc (gcc 2.95), but failed with MSYS/gcc (both 2.95 and 3.2). Most source files compile into .o files, but "cmdline.c" fails to compile. The following error messages are given: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -Wno-deprecated -g -O2 -c `test -f 'cmdline.c' || echo './'`cmdline.c cmdline.c: In function `cmdline_parser': cmdline.c:150: warning: passing arg 1 of `getopt_long' makes pointer from integer without a cast cmdline.c:150: warning: passing arg 2 of `getopt_long' from incompatible pointer type Later on, more error messages appear, related mainly with problems in "cmdline.c". These error are at the end of the message. I am using Win98 in a AMD K6 processorand 32 MB memory. I don't know if the error is in MSYS or in the source code. Any tips? thanks, horacio P.S.: why is the compilation sooooooooo long with gcc 3.2? source='startapp.cc' object='startapp.o' libtool=no \ depfile='.deps/startapp.Po' tmpdepfile='.deps/startapp.TPo' \ depmode=gcc /bin/sh ../depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../src/lib -I../src/genhtml -Wno-deprecated -DSOURCE_HIGHLIGHT_DATA_DIR=\"/c/progs/srchi2/share/source-highlight\" -g -O2 -c -o startapp.o `test -f 'startapp.cc' || echo './'`startapp.cc g++ -DSOURCE_HIGHLIGHT_DATA_DIR=\"/c/progs/srchi2/share/source-highlight\" -g -O2 -o source-highlight.exe cpp_scanner.o java_scanner.o prolog_scanner.o perl_scanner.o php3_scanner.o python_scanner.o flex_scanner.o changelog_scanner.o source-highlight.o startapp.o genhtml/libgenhtml.a lib/libcommon.a lib/libcommon.a(cmdline.o): In function `cmdline_parser': c:/sources/c++/src_high/src/lib/cmdline.c:122: undefined reference to `optarg' c:/sources/c++/src_high/src/lib/cmdline.c:123: undefined reference to `optind' c:/sources/c++/src_high/src/lib/cmdline.c:124: undefined reference to `opterr' c:/sources/c++/src_high/src/lib/cmdline.c:125: undefined reference to `optopt' c:/sources/c++/src_high/src/lib/cmdline.c:150: undefined reference to `getopt_long' c:/sources/c++/src_high/src/lib/cmdline.c:330: undefined reference to `optarg' c:/sources/c++/src_high/src/lib/cmdline.c:317: undefined reference to `optarg' c:/sources/c++/src_high/src/lib/cmdline.c:292: undefined reference to `optarg' c:/sources/c++/src_high/src/lib/cmdline.c:281: undefined reference to `optarg' c:/sources/c++/src_high/src/lib/cmdline.c:259: undefined reference to `optarg' lib/libcommon.a(cmdline.o):c:/sources/c++/src_high/src/lib/cmdline.c:248: more undefined references to `optarg' follow lib/libcommon.a(cmdline.o): In function `cmdline_parser': c:/sources/c++/src_high/src/lib/cmdline.c:359: undefined reference to `optind' c:/sources/c++/src_high/src/lib/cmdline.c:366: undefined reference to `optind' c:/sources/c++/src_high/src/lib/cmdline.c:367: undefined reference to `optind' c:/sources/c++/src_high/src/lib/cmdline.c:367: undefined reference to `optind' lib/libcommon.a(optscanner.o): In function `Z8opsc_lexv': c:/sources/c++/src_high/src/lib/optscanner.cc:921: undefined reference to `yywrap' lib/libcommon.a(optscanner.o): In function `Z10opsc_inputv': c:/sources/c++/src_high/src/lib/optscanner.cc:1266: undefined reference to `yywrap' make[4]: *** [source-highlight.exe] Error 1 make[4]: Leaving directory `/c/sources/c++/src_high/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/c/sources/c++/src_high/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/c/sources/c++/src_high/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/sources/c++/src_high' make: *** [all] Error 2 |
From: Lorenzo B. <be...@ds...> - 2002-10-24 18:18:03
|
Hi Horacio, Montenegro, Horacio wrote: > Hi, > > I have tried to compile source-highlight 1.6 with both Cygwin and > MSYS. It compiled sucessfullt with Cygwin/gcc (gcc 2.95), but failed with > MSYS/gcc (both 2.95 and 3.2). Most source files compile into .o files, but > "cmdline.c" fails to compile. The following error messages are given: I've never used MSYS compilers, so I can only guess... > > gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -Wno-deprecated -g -O2 > -c `test -f 'cmdline.c' || echo './'`cmdline.c > cmdline.c: In function `cmdline_parser': > cmdline.c:150: warning: passing arg 1 of `getopt_long' makes pointer from > integer without a cast > cmdline.c:150: warning: passing arg 2 of `getopt_long' from incompatible > pointer type these are basically warnings but they sound worrying > > Later on, more error messages appear, related mainly with problems > in "cmdline.c". These error are at the end of the message. > > I am using Win98 in a AMD K6 processorand 32 MB memory. I don't > know if the error is in MSYS or in the source code. Any tips? > > thanks, > horacio > > P.S.: why is the compilation sooooooooo long with gcc 3.2? I think gcc 3.2 tries to do many more optimizations and your machine does not seem to have many resources (moreover the scanner for some languages included in source-highlight are very heavy...) From the errors you report in the e-mail, it looks there are some problems with the function getopt_long that the code in cmdline.c (it is automatically by another GNU tool, gengetopt) relies on, and that should be included in the C library. It looks like this function is not found the C library or it is not found as expected... would the mingw-msys developers confirm this? Also the result of the configuration phase would be helpful: I'm talking about the config.log generated after you ran configure. Could you please send it to me, so that I can try to figure out what happened? Could you please try to search in your hard drive for the file getopt.h? If you find it, could you please send it to me? thanks again cheers Lorenzo > > > source='startapp.cc' object='startapp.o' libtool=no \ > depfile='.deps/startapp.Po' tmpdepfile='.deps/startapp.TPo' \ > depmode=gcc /bin/sh ../depcomp \ > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../src/lib -I../src/genhtml > -Wno-deprecated > -DSOURCE_HIGHLIGHT_DATA_DIR=\"/c/progs/srchi2/share/source-highlight\" -g > -O2 -c -o startapp.o `test -f 'startapp.cc' || echo './'`startapp.cc > g++ > -DSOURCE_HIGHLIGHT_DATA_DIR=\"/c/progs/srchi2/share/source-highlight\" -g > -O2 -o source-highlight.exe cpp_scanner.o java_scanner.o > prolog_scanner.o perl_scanner.o php3_scanner.o python_scanner.o > flex_scanner.o changelog_scanner.o source-highlight.o startapp.o > genhtml/libgenhtml.a lib/libcommon.a > lib/libcommon.a(cmdline.o): In function `cmdline_parser': > c:/sources/c++/src_high/src/lib/cmdline.c:122: undefined reference to > `optarg' > c:/sources/c++/src_high/src/lib/cmdline.c:123: undefined reference to > `optind' > c:/sources/c++/src_high/src/lib/cmdline.c:124: undefined reference to > `opterr' > c:/sources/c++/src_high/src/lib/cmdline.c:125: undefined reference to > `optopt' > c:/sources/c++/src_high/src/lib/cmdline.c:150: undefined reference to > `getopt_long' > c:/sources/c++/src_high/src/lib/cmdline.c:330: undefined reference to > `optarg' > c:/sources/c++/src_high/src/lib/cmdline.c:317: undefined reference to > `optarg' > c:/sources/c++/src_high/src/lib/cmdline.c:292: undefined reference to > `optarg' > c:/sources/c++/src_high/src/lib/cmdline.c:281: undefined reference to > `optarg' > c:/sources/c++/src_high/src/lib/cmdline.c:259: undefined reference to > `optarg' > lib/libcommon.a(cmdline.o):c:/sources/c++/src_high/src/lib/cmdline.c:248: > more undefined references to `optarg' follow > lib/libcommon.a(cmdline.o): In function `cmdline_parser': > c:/sources/c++/src_high/src/lib/cmdline.c:359: undefined reference to > `optind' > c:/sources/c++/src_high/src/lib/cmdline.c:366: undefined reference to > `optind' > c:/sources/c++/src_high/src/lib/cmdline.c:367: undefined reference to > `optind' > c:/sources/c++/src_high/src/lib/cmdline.c:367: undefined reference to > `optind' > lib/libcommon.a(optscanner.o): In function `Z8opsc_lexv': > c:/sources/c++/src_high/src/lib/optscanner.cc:921: undefined reference to > `yywrap' > lib/libcommon.a(optscanner.o): In function `Z10opsc_inputv': > c:/sources/c++/src_high/src/lib/optscanner.cc:1266: undefined reference to > `yywrap' > make[4]: *** [source-highlight.exe] Error 1 > make[4]: Leaving directory `/c/sources/c++/src_high/src' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/c/sources/c++/src_high/src' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/c/sources/c++/src_high/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/c/sources/c++/src_high' > make: *** [all] Error 2 > -- +-----------------------------------------------------+ | Lorenzo Bettini ICQ# lbetto, 16080134 | | PhD student in Computer Science | | Dip. Sistemi e Informatica, Univ. di Firenze | | Tel +39 055 4796741, Fax +39 055 4796730 | | Florence - Italy (Linux User # 158233) | | Home Page : http://www.lorenzobettini.it | | E-Mail : be...@ds... | | http://music.dsi.unifi.it XKlaim language | | http://www.lorenzobettini.it/purple Cover Band | | http://www.gnu.org/software/src-highlite | | http://www.gnu.org/software/gengetopt | +-----------------------------------------------------+ |
From: Luke D. <cod...@ho...> - 2002-10-25 10:56:50
|
----- Original Message ----- From: "Lorenzo Bettini" <be...@ds...> To: "Montenegro, Horacio" <hor...@un...> Cc: <min...@li...> Sent: Friday, October 25, 2002 2:11 AM Subject: [Mingw-msys] Re: Problems with source-highlight and MSYS > Hi Horacio, > > Montenegro, Horacio wrote: > > Hi, > > > > I have tried to compile source-highlight 1.6 with both Cygwin and > > MSYS. It compiled sucessfullt with Cygwin/gcc (gcc 2.95), but failed with > > MSYS/gcc (both 2.95 and 3.2). Most source files compile into .o files, but > > "cmdline.c" fails to compile. The following error messages are given: > > I've never used MSYS compilers, so I can only guess... I am quite sure he meant that he is using the Mingw compiler under MSYS, because the MSYS compiler is a separate package and is not version 3.2. > > > > > gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -Wno-deprecated -g -O2 > > -c `test -f 'cmdline.c' || echo './'`cmdline.c > > cmdline.c: In function `cmdline_parser': > > cmdline.c:150: warning: passing arg 1 of `getopt_long' makes pointer from > > integer without a cast > > cmdline.c:150: warning: passing arg 2 of `getopt_long' from incompatible > > pointer type > > these are basically warnings but they sound worrying > Yes they are a bit worrying but they might not need to be fixed. > > > > Later on, more error messages appear, related mainly with problems > > in "cmdline.c". These error are at the end of the message. > > > > I am using Win98 in a AMD K6 processorand 32 MB memory. I don't > > know if the error is in MSYS or in the source code. Any tips? > > > > thanks, > > horacio > > > > P.S.: why is the compilation sooooooooo long with gcc 3.2? > > I think gcc 3.2 tries to do many more optimizations and your machine > does not seem to have many resources (moreover the scanner for some > languages included in source-highlight are very heavy...) > If the C++ parts of the software use iostreams or some other parts of the standard C++ library this may also cause GCC 3.2 to appear slower than the old compiler, because libstdc++ has changed a lot to become more standards-compliant. > From the errors you report in the e-mail, it looks there are some > problems with the function getopt_long that the code in cmdline.c (it is > automatically by another GNU tool, gengetopt) relies on, and that should > be included in the C library. > > It looks like this function is not found the C library or it is not > found as expected... would the mingw-msys developers confirm this? > While this might be true for a POSIX system (I don't know), Mingw is not POSIX and uses the MSVC runtime library so you can't expect getopt to be present. If you are assuming that Horacio is building an MSYS-dependent program then that would be a different story. However, Mingw gcc and binutils (and therefore the Mingw 2.0.0 package I expect) are distributed with libiberty.a, which does include getopt. The headers for libiberty are not included though, so you would need to get the source if just linking to the library does not work. > Also the result of the configuration phase would be helpful: I'm talking > about the config.log generated after you ran configure. Could you > please send it to me, so that I can try to figure out what happened? > Indeed, the configure script should have detected that getopt is not in the C library. It might be easy enough to add -liberty to the link command manually in some way. > Could you please try to search in your hard drive for the file getopt.h? > > If you find it, could you please send it to me? If the configure script determined that getopt is not in the Mingw headers (which it isn't for recent versions), it may have added a prototype itself so the header would not be required. Of course, getting the header will only help. > > thanks again > > cheers > Lorenzo > Luke Dunstan |
From: Lorenzo B. <be...@ds...> - 2002-10-27 08:44:18
|
Luke Dunstan wrote: >>>gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -Wno-deprecated -g -O2 >>>-c `test -f 'cmdline.c' || echo './'`cmdline.c >>>cmdline.c: In function `cmdline_parser': >>>cmdline.c:150: warning: passing arg 1 of `getopt_long' makes pointer >> > from > >>>integer without a cast >>>cmdline.c:150: warning: passing arg 2 of `getopt_long' from incompatible >>>pointer type >> >>these are basically warnings but they sound worrying >> > > > Yes they are a bit worrying but they might not need to be fixed. > indeed I think I discovered the reason for these warnings: the getopt.h is not found, thus the signature of the function getopt_long is not inserted in the compilation, and C assumes 'int' for unspecified types... >> From the errors you report in the e-mail, it looks there are some >>problems with the function getopt_long that the code in cmdline.c (it is >>automatically by another GNU tool, gengetopt) relies on, and that should >>be included in the C library. >> >>It looks like this function is not found the C library or it is not >>found as expected... would the mingw-msys developers confirm this? >> > > While this might be true for a POSIX system (I don't know), Mingw is not > POSIX and uses the MSVC runtime library so you can't expect getopt to be > present. If you are assuming that Horacio is building an MSYS-dependent sorry I meant this. I know getopt is not standard. >>Also the result of the configuration phase would be helpful: I'm talking >>about the config.log generated after you ran configure. Could you >>please send it to me, so that I can try to figure out what happened? >> > > > Indeed, the configure script should have detected that getopt is not in the > C library. It might be easy enough to add -liberty to the link command > manually in some way. > the configure script that comes with source-highlight actually checks for the presence of getopt, and if it is not found it automatically links the program with the versions of getopt that are distributed together with source-highlight. I personally tested it in systems where getopt is not provided and it did work. So I suspect that Horacio has not rerun the configure script after switching the compiler (from cygnus to Mingw), or he has rerun it but the configure script has already cached that getopt was present in the system (if cygwin has been used before). Horacio could you confirm this? thanks Lorenzo -- +-----------------------------------------------------+ | Lorenzo Bettini ICQ# lbetto, 16080134 | | PhD student in Computer Science | | Dip. Sistemi e Informatica, Univ. di Firenze | | Tel +39 055 4796741, Fax +39 055 4796730 | | Florence - Italy (Linux User # 158233) | | Home Page : http://www.lorenzobettini.it | | E-Mail : be...@ds... | | http://music.dsi.unifi.it XKlaim language | | http://www.lorenzobettini.it/purple Cover Band | | http://www.gnu.org/software/src-highlite | | http://www.gnu.org/software/gengetopt | +-----------------------------------------------------+ |
From: Lorenzo B. <be...@ds...> - 2002-10-31 14:28:48
|
Hi everyone! The problem is solved: the configure script did not execute all the right checks (it used to, but some new features I had added happened to break these checks). I'm about to upload the patched release. thanks to you all for your help :-) cheers Lorenzo Luke Dunstan wrote: > ----- Original Message ----- > From: "Lorenzo Bettini" <be...@ds...> > To: "Montenegro, Horacio" <hor...@un...> > Cc: <min...@li...> > Sent: Friday, October 25, 2002 2:11 AM > Subject: [Mingw-msys] Re: Problems with source-highlight and MSYS > > > >>Hi Horacio, >> >>Montenegro, Horacio wrote: >> >>>Hi, >>> >>>I have tried to compile source-highlight 1.6 with both Cygwin and >>>MSYS. It compiled sucessfullt with Cygwin/gcc (gcc 2.95), but failed >> > with > >>>MSYS/gcc (both 2.95 and 3.2). Most source files compile into .o files, >> > but > >>>"cmdline.c" fails to compile. The following error messages are given: >> >>I've never used MSYS compilers, so I can only guess... > > > I am quite sure he meant that he is using the Mingw compiler under MSYS, > because the MSYS compiler is a separate package and is not version 3.2. > > >>>gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src -Wno-deprecated -g -O2 >>>-c `test -f 'cmdline.c' || echo './'`cmdline.c >>>cmdline.c: In function `cmdline_parser': >>>cmdline.c:150: warning: passing arg 1 of `getopt_long' makes pointer >> > from > >>>integer without a cast >>>cmdline.c:150: warning: passing arg 2 of `getopt_long' from incompatible >>>pointer type >> >>these are basically warnings but they sound worrying >> > > > Yes they are a bit worrying but they might not need to be fixed. > > >>>Later on, more error messages appear, related mainly with problems >>>in "cmdline.c". These error are at the end of the message. >>> >>>I am using Win98 in a AMD K6 processorand 32 MB memory. I don't >>>know if the error is in MSYS or in the source code. Any tips? >>> >>>thanks, >>>horacio >>> >>>P.S.: why is the compilation sooooooooo long with gcc 3.2? >> >>I think gcc 3.2 tries to do many more optimizations and your machine >>does not seem to have many resources (moreover the scanner for some >>languages included in source-highlight are very heavy...) >> > > > If the C++ parts of the software use iostreams or some other parts of the > standard C++ library this may also cause GCC 3.2 to appear slower than the > old compiler, because libstdc++ has changed a lot to become more > standards-compliant. > > >> From the errors you report in the e-mail, it looks there are some >>problems with the function getopt_long that the code in cmdline.c (it is >>automatically by another GNU tool, gengetopt) relies on, and that should >>be included in the C library. >> >>It looks like this function is not found the C library or it is not >>found as expected... would the mingw-msys developers confirm this? >> > > > > While this might be true for a POSIX system (I don't know), Mingw is not > POSIX and uses the MSVC runtime library so you can't expect getopt to be > present. If you are assuming that Horacio is building an MSYS-dependent > program then that would be a different story. However, Mingw gcc and > binutils (and therefore the Mingw 2.0.0 package I expect) are distributed > with libiberty.a, which does include getopt. The headers for libiberty are > not included though, so you would need to get the source if just linking to > the library does not work. > > >>Also the result of the configuration phase would be helpful: I'm talking >>about the config.log generated after you ran configure. Could you >>please send it to me, so that I can try to figure out what happened? >> > > > Indeed, the configure script should have detected that getopt is not in the > C library. It might be easy enough to add -liberty to the link command > manually in some way. > > >>Could you please try to search in your hard drive for the file getopt.h? >> >>If you find it, could you please send it to me? > > > If the configure script determined that getopt is not in the Mingw headers > (which it isn't for recent versions), it may have added a prototype itself > so the header would not be required. Of course, getting the header will only > help. > > >>thanks again >> >>cheers >>Lorenzo >> > > > Luke Dunstan -- +-----------------------------------------------------+ | Lorenzo Bettini ICQ# lbetto, 16080134 | | PhD student in Computer Science | | Dip. Sistemi e Informatica, Univ. di Firenze | | Tel +39 055 4796741, Fax +39 055 4796730 | | Florence - Italy (Linux User # 158233) | | Home Page : http://www.lorenzobettini.it | | E-Mail : be...@ds... | | http://music.dsi.unifi.it XKlaim language | | http://www.lorenzobettini.it/purple Cover Band | | http://www.gnu.org/software/src-highlite | | http://www.gnu.org/software/gengetopt | +-----------------------------------------------------+ |