[Bug c++/36576] New: gcc 4.3.1 doesn't build for me on openSUSE 10.3
gcc build terminates with an error on gcc 4.3.1. Source is installed in /home//gcc-4.3.1 (gcc, g++, objc, java, fortran, libstdc++) Make is called in /home//gcc-4.3.1-bin after having called ../gcc-4.3.1/configure from that folder. libtool: compile: /home/schaeff/gcc-4.3.1-bin/./gcc/xgcc -shared-libgcc -B/home/schaeff/gcc-4.3.1-bin/./gcc -nostdinc++ -L/home/schaeff/gcc-4.3.1-bin/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/home/schaeff/gcc-4.3.1-bin/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.3.1/libjava -I./include -I./gcj -I../../../gcc-4.3.1/libjava -Iinclude -I../../../gcc-4.3.1/libjava/include -I../../../gcc-4.3.1/libjava/classpath/include -Iclasspath/include -I../../../gcc-4.3.1/libjava/classpath/native/fdlibm -I../../../gcc-4.3.1/libjava/../boehm-gc/include -I../boehm-gc/include -I../../../gcc-4.3.1/libjava/libltdl -I../../../gcc-4.3.1/libjava/libltdl -I../../../gcc-4.3.1/libjava/.././libjava/../gcc -I../../../gcc-4.3.1/libjava/../zlib -I../../../gcc-4.3.1/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -DTOOLEXECLIBDIR=\"/usr/local/lib/../lib64\" -DJAVA_HOME=\"/usr/local\" -DBOOT_CLASS_PATH=\"/usr/local/share/java/libgcj-4.3.1.jar\" -DJAVA_EXT_DIRS=\"/usr/local/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/usr/local/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/usr/local/lib/../lib64/gcj-4.3.1-9\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DEFAULT_DATABASE=\"/usr/local/lib/../lib64/gcj-4.3.1-9/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.3.1/classmap.db\" -g -O2 -D_GNU_SOURCE -MT posix-threads.lo -MD -MP -MF .deps/posix-threads.Tpo -c ../../../gcc-4.3.1/libjava/posix-threads.cc -o posix-threads.o >/dev/null 2>&1 here=`pwd`; cd ../../../gcc-4.3.1/libjava/classpath/lib; \ find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \ gjar -cfM@ $here/libgcj-4.3.1.jar jar: internal error: java.lang.NullPointerException: man at java.util.jar.JarOutputStream.(JarOutputStream.java:43) at gnu.classpath.tools.jar.Creator.writeCommandLineEntries(Creator.java:225) at gnu.classpath.tools.jar.Creator.run(Creator.java:246) at gnu.classpath.tools.jar.Main.run(Main.java:276) at gnu.classpath.tools.jar.Main.main(Main.java:284) make[3]: *** [libgcj-4.3.1.jar] Fehler 1 make[3]: Leaving directory `/home/schaeff/gcc-4.3.1-bin/x86_64-unknown-linux-gnu/libjava' make[2]: *** [all-recursive] Fehler 1 make[2]: Leaving directory `/home/schaeff/gcc-4.3.1-bin/x86_64-unknown-linux-gnu/libjava' make[1]: *** [all-target-libjava] Fehler 2 make[1]: Leaving directory `/home/schaeff/gcc-4.3.1-bin' make: *** [all] Fehler 2 -- Summary: gcc 4.3.1 doesn't build for me on openSUSE 10.3 Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: karx11erx at hotmail dot com GCC build triplet: X86 GCC host triplet: X86 GCC target triplet: X86 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #2 from karx11erx at hotmail dot com 2008-06-19 15:59 --- (In reply to comment #1) > This is a bug in opensuse's gjar. > > *** This bug has been marked as a duplicate of 35257 *** > How do I fix it? -- karx11erx at hotmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|DUPLICATE | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #4 from karx11erx at hotmail dot com 2008-06-19 20:01 --- (In reply to comment #3) > Update your system. Report this bug to OpenSUSE. > > *** This bug has been marked as a duplicate of 35257 *** > My system is up to date. It is automatically updated several times a week. Is there an updated gjar somewhere I can install? -- karx11erx at hotmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|DUPLICATE | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #5 from karx11erx at hotmail dot com 2008-06-20 09:58 --- (In reply to comment #3) > Update your system. Report this bug to OpenSUSE. > > *** This bug has been marked as a duplicate of 35257 *** > I have been searching around a little and found that the gjar used by openSUSE 10.3 belongs to a classpath package that is coming from gnu.org (http://www.gnu.org/software/classpath/). Seems pretty daft to me to claim this would be a bug I'd have to report to SUSE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #6 from karx11erx at hotmail dot com 2008-06-20 11:00 --- (In reply to comment #5) > (In reply to comment #3) > > Update your system. Report this bug to OpenSUSE. > > > > *** This bug has been marked as a duplicate of 35257 *** > > > > I have been searching around a little and found that the gjar used by openSUSE > 10.3 belongs to a classpath package that is coming from gnu.org > (http://www.gnu.org/software/classpath/). Seems pretty daft to me to claim > this > would be a bug I'd have to report to SUSE. > (In reply to comment #3) > Update your system. Report this bug to OpenSUSE. > > *** This bug has been marked as a duplicate of 35257 *** > Now this is great: I have found the latest classpath source, but: I have no clue where to have install put the stuff in - though that doesn't matter, because the install procedure needs several libraries in newer versions than I have installed on my system, and which do not seem to be available from SUSE. So I can either try to collect all that stuff from somewhere from the internet and install it manually, hoping it doesn't break my system, spending hours and hours of additional work with dubious prospect of success, or wait for SUSE to release gcc 4.3. All that because some not so smart people chose classpath over Sun's java libs for the sake of it being free, although it is not yet available in a version that indicates it would be stable, and that is at least 1.something. And all that is why? Because gcc 4.1 throws some errors on our code that works flawlessly with MS compilers and gcc 3, and that absolutely do not seem to be justified, and I wanted to make sure this problem is either fixed or still present in the latest gcc release in order to avoid remarks like "update to the latest compiler version". I would so love to use Linux, but as soon as you leave the beaten path of common distros and are not an expert of sorts, you are completely lost with this operating "system" (I miss the "system" in this stuff). When will you Linux geeks learn to get your act together, if you ever want to offer a true alternative to Windows? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #9 from karx11erx at hotmail dot com 2008-06-20 12:28 --- (In reply to comment #8) > > Because gcc 4.1 throws some errors on our > > code that works flawlessly with MS compilers and gcc 3, and that absolutely > > do > > not seem to be justified, and I wanted to make sure this problem is either > > fixed or still present in the latest gcc release in order to avoid remarks > > like > > "update to the latest compiler version". > > Have you read the changes pages? > Start with http://gcc.gnu.org/gcc-3.4/changes.html and then read > http://gcc.gnu.org/gcc-4.0/changes.html and then > http://gcc.gnu.org/gcc-4.1/changes.html . Most likely your C++ code is not > really standard C++ after all. > Which rule is forbidding this: template class CTest { struct test { int i; } test *testptr; }; -- karx11erx at hotmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|DUPLICATE | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #10 from karx11erx at hotmail dot com 2008-06-20 12:33 --- (In reply to comment #9) > (In reply to comment #8) > > > Because gcc 4.1 throws some errors on our > > > code that works flawlessly with MS compilers and gcc 3, and that > > > absolutely do > > > not seem to be justified, and I wanted to make sure this problem is > > > either > > > fixed or still present in the latest gcc release in order to avoid > > > remarks like > > > "update to the latest compiler version". > > > > Have you read the changes pages? > > Start with http://gcc.gnu.org/gcc-3.4/changes.html and then read > > http://gcc.gnu.org/gcc-4.0/changes.html and then > > http://gcc.gnu.org/gcc-4.1/changes.html . Most likely your C++ code is not > > really standard C++ after all. > > > > Which rule is forbidding this: > > template class CTest { >struct test { > int i; >} test *testptr; > }; > (In reply to comment #8) > > Because gcc 4.1 throws some errors on our > > code that works flawlessly with MS compilers and gcc 3, and that absolutely > > do > > not seem to be justified, and I wanted to make sure this problem is either > > fixed or still present in the latest gcc release in order to avoid remarks > > like > > "update to the latest compiler version". > > Have you read the changes pages? > Start with http://gcc.gnu.org/gcc-3.4/changes.html and then read > http://gcc.gnu.org/gcc-4.0/changes.html and then > http://gcc.gnu.org/gcc-4.1/changes.html . Most likely your C++ code is not > really standard C++ after all. > There is also no ambiguity in this: template CBase { protected: T *i; }; template CDerived : public CBase { inline T* foo (void) { return const_cast i; } } Yet it only compiles if it is defined like this: template CDerived : public CBase { inline T* foo (void) { return const_cast this->i; } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #12 from karx11erx at hotmail dot com 2008-06-20 13:03 --- (In reply to comment #11) > > There is also no ambiguity in this: > > Why that is invalid code is shown on http://gcc.gnu.org/gcc-3.4/changes.html . > > (In reply to comment #9) > > Which rule is forbidding this: > > > > template class CTest { > >struct test { > > int i; > >} test *testptr; > > }; > > For this, you have a variable that is test and then *testptr which does not > make sense. Try it in a non template and you will see that it is invalid > code. > I have read the rule that enforces "this->" dereferencing - for the sake of resolving ambiguity. There is no ambiguity in the above declaration though. The struct variable/pointer variable declaration declares two variables at once, where the latter can be changed whenever seen fit. I can't see why it shouldn't make sense (but I may add to my defense that I haven't written that code and never would have written code like that: It is my ungrateful task to make it fit for gcc 4). Anyway, gcc 4 is the only compiler we found yet to reject this code. Well, stuff like that shouldn't appear to often, so we can manually fix it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576
[Bug c++/36576] gcc 4.3.1 doesn't build for me on openSUSE 10.3
--- Comment #14 from karx11erx at hotmail dot com 2008-06-21 08:57 --- (In reply to comment #13) > think of: > > template struct CBase > { > protected: >T *i; > }; > template<> struct CBase > { > protected: typedef int i; > }; > > template struct CDerived : public CBase > { > inline T* foo (void) { return const_cast i; } > } > > What happens then? > That was not the code, and is not contained anywhere in that code. Your case seems totally theoretical and constructed, rather like "look what crazy things could be done with templates!" To be honest, while I have some basic understanding of templates and healthy applications for them, I don't even understand "template<> struct CBase" and wonder why one would declare a type inside of it. But anyway, as the required changes are ISO conformant, our source code will be changed accordingly (and I won't have to do it, hah). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36576