Alien Bob’s gcc5.SlackBuild won’t create Java compiler and supporting files.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Alien Bob’s gcc5.SlackBuild won’t create Java compiler and supporting files.
I’m trying to build GCC 5 from Alien Bob’s gcc5 package (yes, I know—there’s a pre-built package available, but I’m running Slackware64-current, for which only a multilib package is available, while my system is pure 64-bit; plus, out of curiosity, I wanted to attempt the build myself anyway).
When I start the build, it informs me that it will create compilers for C, C++ and Java.
However, when the build finishes, the Java part is missing. Also, if I list the contents of the resulting package, then only 1398 lines of output are produced:
Code:
$ tar -tvJf gcc5-5.5.0-x86_64-1alien.txz | wc --lines
1398
When I do the same on the pre-built 32-bit (“i586”) package, on the other hand, I get 5553 lines, while the 64-bit multilib (“multilib-x86_64”) package will produce 5662 lines.
In addition, for the package that I built, none of the paths have “jvm” anywhere in their names, while the 32-bit and 64-bit pre-built packages have 21 and 23 entries, respectively, with “jvm” somewhere in the path.
The “gcc.build.log” does indicate that the SlackBuild appears to understand that the Java support files should be built, as it includes, e.g., the following lines:
By the way, the build log also includes four lines that report a strange “command not found” problem:
Code:
53946 ../../../../gcc-5.5.0/libjava/classpath/configure: line 18201: libdir: command not found
53947 ../../../../gcc-5.5.0/libjava/classpath/configure: line 18201: target_noncanonical: command not found
53948 ../../../../gcc-5.5.0/libjava/classpath/configure: line 18201: gcc_version: command not found
55658 ./gcc5.SlackBuild: line 462: only: command not found
That last one I can understand, because it looks like there’s a hash-sign (see the “#” below) missing on what should be a comment line in the “gcc5.SlackBuild” script:
Code:
460 if [ ${MULTILIB} = "NO" ]; then
461 # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
462 # (only needed if gcc was compiled with disable-multilib)
463 if [ "$ARCH" = "x86_64" ]; then
464 sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
465 $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
466 fi
467 fi
Other than this little detail, I have no idea whatsoever what is going on and going wrong with this SlackBuild.
Maybe it'd be worth looking at the output generated by the SlackBuild. That could indicate why the java portions weren't created. You could try and post that output on pastebin and link to it here so others can possibly look through it and maybe find the culprit.
I'm not sure of what's happening there, but I've installed gcc5 (kindly contributed by Alien Bob) from this repository (should be very similar to the one you tested) and I have the java compiler and tools available after building, if I source the appropriate profile.d file, like explained in the README: I just tested using it by building successfully pdftk, that needs gcjh.
also I have a bunch of links in /usr/lib64/jvm/ here
Code:
# ls -laR /usr/lib64/jvm/*
/usr/lib64/jvm/bin:
total 8
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 7 root root 4096 Mar 25 07:02 ../
lrwxrwxrwx 1 root root 28 Mar 25 08:50 appletviewer -> ../../../bin/gappletviewer-5*
lrwxrwxrwx 1 root root 19 Mar 25 08:50 jar -> ../../../bin/gjar-5*
lrwxrwxrwx 1 root root 25 Mar 25 08:50 jarsigner -> ../../../bin/gjarsigner-5*
lrwxrwxrwx 1 root root 18 Mar 25 08:50 java -> ../../../bin/gij-5*
lrwxrwxrwx 1 root root 16 Mar 25 08:50 javac -> ../../../bin/ecj*
lrwxrwxrwx 1 root root 20 Mar 25 08:50 javadoc -> ../../../bin/gjdoc-5*
lrwxrwxrwx 1 root root 21 Mar 25 08:50 javah -> ../../../bin/gjavah-5*
lrwxrwxrwx 1 root root 23 Mar 25 08:50 keytool -> ../../../bin/gkeytool-5*
lrwxrwxrwx 1 root root 28 Mar 25 08:50 native2ascii -> ../../../bin/gnative2ascii-5*
lrwxrwxrwx 1 root root 20 Mar 25 08:50 orbd -> ../../../bin/gorbd-5*
lrwxrwxrwx 1 root root 20 Mar 25 08:50 rmic -> ../../../bin/grmic-5*
lrwxrwxrwx 1 root root 20 Mar 25 08:50 rmid -> ../../../bin/grmid-5*
lrwxrwxrwx 1 root root 27 Mar 25 08:50 rmiregistry -> ../../../bin/grmiregistry-5*
lrwxrwxrwx 1 root root 25 Mar 25 08:50 serialver -> ../../../bin/gserialver-5*
lrwxrwxrwx 1 root root 25 Mar 25 08:50 tnameserv -> ../../../bin/gtnameserv-5*
/usr/lib64/jvm/include:
total 20
drwxr-xr-x 3 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 7 root root 4096 Mar 25 07:02 ../
lrwxrwxrwx 1 root root 69 Mar 25 08:50 jawt.h -> ../../../bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/include/jawt.h
lrwxrwxrwx 1 root root 68 Mar 25 08:50 jni.h -> ../../../bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/include/jni.h
drwxr-xr-x 2 root root 4096 Mar 25 08:50 linux/
/usr/lib64/jvm/include/linux:
total 16
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 3 root root 4096 Mar 25 08:50 ../
lrwxrwxrwx 1 root root 75 Mar 25 08:50 jawt_md.h -> ../../../../bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/include/jawt_md.h
lrwxrwxrwx 1 root root 74 Mar 25 08:50 jni_md.h -> ../../../../bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/include/jni_md.h
/usr/lib64/jvm/jre:
total 16
drwxr-xr-x 4 root root 4096 Mar 25 07:02 ./
drwxr-xr-x 7 root root 4096 Mar 25 07:02 ../
drwxr-xr-x 2 root root 4096 Mar 25 08:50 bin/
drwxr-xr-x 4 root root 4096 Mar 25 08:50 lib/
/usr/lib64/jvm/jre/bin:
total 8
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 07:02 ../
lrwxrwxrwx 1 root root 21 Mar 25 08:50 java -> ../../../../bin/gij-5*
lrwxrwxrwx 1 root root 26 Mar 25 08:50 keytool -> ../../../../bin/gkeytool-5*
lrwxrwxrwx 1 root root 23 Mar 25 08:50 orbd -> ../../../../bin/gorbd-5*
lrwxrwxrwx 1 root root 23 Mar 25 08:50 rmid -> ../../../../bin/grmid-5*
lrwxrwxrwx 1 root root 30 Mar 25 08:50 rmiregistry -> ../../../../bin/grmiregistry-5*
lrwxrwxrwx 1 root root 28 Mar 25 08:50 tnameserv -> ../../../../bin/gtnameserv-5*
/usr/lib64/jvm/jre/lib:
total 16
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 07:02 ../
drwxr-xr-x 4 root root 4096 Mar 25 08:50 amd64/
lrwxrwxrwx 1 root root 39 Mar 25 08:50 rt.jar -> ../../../../share/java/libgcj-5.5.0.jar
drwxr-xr-x 2 root root 4096 Mar 25 08:50 security/
/usr/lib64/jvm/jre/lib/amd64:
total 20
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ../
drwxr-xr-x 2 root root 4096 Mar 25 08:50 client/
lrwxrwxrwx 1 root root 68 Mar 25 08:50 libjawt.so -> ../../../../gcc/x86_64-slackware-linux/5.5.0/gcj-5.5.0-16/libjawt.so
drwxr-xr-x 2 root root 4096 Mar 25 08:50 server/
/usr/lib64/jvm/jre/lib/amd64/client:
total 12
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ../
lrwxrwxrwx 1 root root 70 Mar 25 08:50 libjvm.so -> ../../../../../gcc/x86_64-slackware-linux/5.5.0/gcj-5.5.0-16/libjvm.so*
/usr/lib64/jvm/jre/lib/amd64/server:
total 12
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ../
lrwxrwxrwx 1 root root 70 Mar 25 08:50 libjvm.so -> ../../../../../gcc/x86_64-slackware-linux/5.5.0/gcj-5.5.0-16/libjvm.so*
/usr/lib64/jvm/jre/lib/security:
total 12
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 4 root root 4096 Mar 25 08:50 ../
lrwxrwxrwx 1 root root 72 Mar 25 08:50 java.security -> ../../../../gcc/x86_64-slackware-linux/5.5.0/security/classpath.security
/usr/lib64/jvm/jvm-exports:
total 8
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 7 root root 4096 Mar 25 07:02 ../
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jaas-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jaas-1.5.0.jar -> jaas-1.5.0.0.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jaas.jar -> jaas-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jce-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 15 Mar 25 08:50 jce-1.5.0.jar -> jce-1.5.0.0.jar
lrwxrwxrwx 1 root root 15 Mar 25 08:50 jce.jar -> jce-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jdbc-stdext-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 23 Mar 25 08:50 jdbc-stdext-1.5.0.jar -> jdbc-stdext-1.5.0.0.jar
lrwxrwxrwx 1 root root 23 Mar 25 08:50 jdbc-stdext.jar -> jdbc-stdext-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jndi-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jndi-1.5.0.jar -> jndi-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jndi-cos-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-cos-1.5.0.jar -> jndi-cos-1.5.0.0.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-cos.jar -> jndi-cos-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jndi-dns-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-dns-1.5.0.jar -> jndi-dns-1.5.0.0.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-dns.jar -> jndi-dns-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jndi-ldap-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 21 Mar 25 08:50 jndi-ldap-1.5.0.jar -> jndi-ldap-1.5.0.0.jar
lrwxrwxrwx 1 root root 21 Mar 25 08:50 jndi-ldap.jar -> jndi-ldap-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jndi-rmi-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-rmi-1.5.0.jar -> jndi-rmi-1.5.0.0.jar
lrwxrwxrwx 1 root root 20 Mar 25 08:50 jndi-rmi.jar -> jndi-rmi-1.5.0.0.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jndi.jar -> jndi-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 jsse-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jsse-1.5.0.jar -> jsse-1.5.0.0.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 jsse.jar -> jsse-1.5.0.0.jar
lrwxrwxrwx 1 root root 17 Mar 25 08:50 sasl-1.5.0.0.jar -> ../jre/lib/rt.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 sasl-1.5.0.jar -> sasl-1.5.0.0.jar
lrwxrwxrwx 1 root root 16 Mar 25 08:50 sasl.jar -> sasl-1.5.0.0.jar
/usr/lib64/jvm/lib:
total 8
drwxr-xr-x 2 root root 4096 Mar 25 08:50 ./
drwxr-xr-x 7 root root 4096 Mar 25 07:02 ../
lrwxrwxrwx 1 root root 42 Mar 25 08:50 tools.jar -> ../../../share/java/libgcj-tools-5.5.0.jar
note that this is not to be considered as a substitute of a proper java virtual machine, you may still need jdk/openjdk to run java binaries succesfully.
also I have a bunch of links in /usr/lib64/jvm/ here
I have just tried your SlackBuild, but I still don’t get the Java stuff.
The ‘gcc5-5.5.0-x86_64-1SBo.tgz’ package has the same number of files as the one I built from the “alien” SlackBuild:
Code:
$ tar -tvzf gcc5-5.5.0-x86_64-1SBo.tgz | wc --lines
1398
After I install the package, the ‘/usr/lib64/jvm/’ directory doesn’t even exist. (The package doesn’t include anything that has ‘jvm’ in its name either.)
I uploaded the gcc5 build log to my Google Drive: https://drive.google.com/open?id=1rE...ZbaOQMGwCmWc5h, but I have no idea where to begin to look for the problem in such a huge log. In fact, I don’t even have any idea what to look for in the first place.
NOTE:
I updated the link to build log, after I retried the build as suggested by orbea in a later post.
END NOTE
The gcc5 SlackBuild doesn’t happen to have any prerequisites that I might be missing, by any chance?
Just for the record, I’m running Slackware64-current, upgraded from a full Slackware 14.2 install.
Last edited by luvr; 03-27-2019 at 12:20 PM.
Reason: Replaced the link to the build log with a link to a more complete log that merges stdout and stderr.
The gcc5 SlackBuild doesn’t happen to have any prerequisites that I might be missing, by any chance?
Just for the record, I’m running Slackware64-current, upgraded from a full Slackware 14.2 install.
this is easy to check: what happens if you do a
Code:
slackpkg update
slackpkg install slackware64
does slackpkg proposes you to install other packages besides the kdei-l10n-* and calligra-l10n-* ones?
Quote:
Originally Posted by luvr
I uploaded the gcc5 build log to my Google Drive: https://drive.google.com/open?id=1Mn...wlpSdtvS32IXpl, but I have no idea where to begin to look for the problem in such a huge log. In fact, I don’t even have any idea what to look for in the first place.
this doesn't seem to be the full log, as the first thing that gets built here is fastjar.
The gcc5 sources/SlackBuild in 14.2's patches/source/gcc directory will build gcc-java, but it is considered dead, obsolete, and removed upstream as of gcc7. I have no idea if the compiler in -current is able to build gcc5 (and gcc5's gcc-java), but it wouldn't surprise me if that's not possible without some code changes.
In any case, I don't know what your purpose is for building gcc-java for gcc5, but I suspect it's a dead end that will get you nowhere.
does slackpkg proposes you to install other packages besides the kdei-l10n-* and calligra-l10n-* ones?
No, it doesn’t (actually, my full Slackware 14.2 install was a really full install, in that it included even the KDEI packages):
Code:
# slackpkg update
Updating the package lists...
Downloading...
Linking //opt/downloads/slackware/slackware64-current/CHECKSUMS.md5.asc...
No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)? N
# slackpkg install slackware64
Looking for slackware64 in package list. Please wait... DONE
No packages match the pattern for install. Try:
/usr/sbin/slackpkg reinstall|upgrade
note that this is not to be considered as a substitute of a proper java virtual machine, you may still need jdk/openjdk to run java binaries succesfully.
(I'm quoting @ponce but this is really directed for the OP.)
The "write once, run anywhere" bit doesn't include "at any time, present and future" after all. (I've been developing software in Java for the past 18 years. [JFC, where does the time go?] The odds of finding 1.5 compliant code to compile now is close to nil, unless you are attempting to resurrect some ancient software.) You might even have to find a Java 1.5 runtime jar as well, due to deprecations.
this doesn't seem to be the full log, as the first thing that gets built here is fastjar.
It is the complete ‘gcc.build.log’ as I find it in the “Temporary build location” (i.e., the directory pointed to by the “TMP” variable) once the build finishes. If the ‘fastjar’ build is missing, then I guess it simply wasn’t done. In any case, the build log must be incomplete, since, obviously, not everything is getting built.
Quote:
Originally Posted by Richard Cranium
The odds of finding 1.5 compliant code to compile now is close to nil, unless you are attempting to resurrect some ancient software.
Quote:
Originally Posted by volkerdi
I don't know what your purpose is for building gcc-java for gcc5, …
Well the story went something like this: first, I installed Slackware 14.2. Next, I installed a second copy of Slackware 14.2, which I upgraded to Slackware-current.
Then, I installed quite a few SlackBuilds on my 14.2 system. Among them, openjdk8. To build openjdk8, I first had to build and install openjdk (i.e., the “7” generation). Then, to build openjdk, I first had to install jdk (the Oracle one). So, in the end, I created the jdk package, installed it, built openjdk, removed jdk, installed openjdk, built openjdk8, removed openjdk, and installed openjdk8.
I am now trying to repeat the installation of these SlackBuilds on my Slackware-current system. So, I created the jdk package (which, in the meantime, got a new revision from Oracle) and installed it. Next, I attempted to build openjdk (gen. “7”), but that requires not only the Oracle JDK, but also GCC Java support—the latter of which is no longer available in GCC 8 (as used on Slackware-current).
I first considered skipping openjdk8, and attempting to install one of the JDK 11 versions that I find on SlackBuild—but then, I discovered the GCC 5 SlackBuild by alienbob (Eric). Since that is supposed to build C, C++ and Java support, I decided to try that first. In fact, when I start the gcc5.SlackBuild, its first on-screen output line tells me:
Code:
Building these compilers: c,c++,java
So, in my infinite wisdom, I considered that a good sign…
… and that is where I am now.
Quote:
Originally Posted by volkerdi
… but I suspect it's a dead end that will get you nowhere.
Possibly, but I thought I’d ask here first.
Given, however, that both alienbob and ponce appear to have successfully built GCC 5, including the Java support, I wonder if, perhaps, the GCC 5 build used to be fine with an earlier GCC and/or autotools version?
Perhaps GCC 8 or the newer autotools can no longer handle it?
It is the complete ‘gcc.build.log’ as I find it in the “Temporary build location” (i.e., the directory pointed to by the “TMP” variable) once the build finishes. If the ‘fastjar’ build is missing, then I guess it simply wasn’t done. In any case, the build log must be incomplete, since, obviously, not everything is getting built.
if you build it like this
Code:
./gcc5.SlackBuild > /tmp/build-gcc5.log 2>&1
then all of the output will go to that file: you can also eventually "tail -f /tmp/build-gcc5.log" if you want to follow the progress (you can stop the tail command via "ctrl-c")
regarding what you are trying to do, in a similar way like you a trying to start with a jdk binary I think that you could also start directly using a prebuilt openjdk for current: Alien Bob already provides one
then all of the output will go to that file: you can also eventually "tail -f /tmp/build-gcc5.log" if you want to follow the progress (you can stop the tail command via "ctrl-c")
I'm sure you know this, but its possible to also follow the output directly with tee.
Code:
./gcc5.SlackBuild 2>&1 | tee /tmp/build-gcc5.log
This way the output prints to the terminal and is saved in the log file without the need for tail, its also useful when using programs like gdb.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.