#63375 closed defect (fixed)
commons-lang3 @3.11: No compiler is provided in this environment
Reported by: | kesterlester | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | cjones051073 (Chris Jones) | |
Port: | commons-lang3 |
Description
host25-36:~ lester$ host25-36:~ lester$ host25-36:~ lester$ sudo port install commons-lang3 ---> Computing dependencies for commons-lang3 ---> Fetching archive for commons-lang3 ---> Attempting to fetch commons-lang3-3.11_0.darwin_20.arm64.tbz2 from https://packages.macports.org/commons-lang3 ---> Attempting to fetch commons-lang3-3.11_0.darwin_20.arm64.tbz2 from https://mse.uk.packages.macports.org/commons-lang3 ---> Attempting to fetch commons-lang3-3.11_0.darwin_20.arm64.tbz2 from https://fra.de.packages.macports.org/commons-lang3 ---> Fetching distfiles for commons-lang3 ---> Verifying checksums for commons-lang3 ---> Extracting commons-lang3 ---> Configuring commons-lang3 ---> Building commons-lang3 Error: Failed to build commons-lang3: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_commons-lang3/commons-lang3/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port commons-lang3 failed host25-36:~ lester$ host25-36:~ lester$ host25-36:~ lester$
The end of the log file suggests that when the failure occurred a JDK could not be found. However a Ver 11 JDK does exist on the system (installed by MacPorts in the last hour) and earlier parts of the log suggest that MacPorts saw it during the build.
I will attach the full to this post if the next dialog box allows me to do so, or will give a link to it in a follow up post if I don't get an opportunity to upload it.
Attachments (1)
Change History (20)
Changed 3 years ago by kesterlester
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | commons-lang3 added |
---|---|
Summary: | port install fails for commons-lang3 → commons-lang3 @3.11: No compiler is provided in this environment |
The port has no maintainer, so if you can provide a fix, please do.
comment:2 Changed 3 years ago by kesterlester
I use macports a lot as an enduser, but I don't have any experience as a maintainer, so I suspect I can't fix this myself. However I know a maintainer of some macports so I'll see if I can persuade him to take look.
comment:3 follow-up: 6 Changed 3 years ago by cjones051073 (Chris Jones)
Hi Chris L. ! Just had a go installing this and it works fine for me on an intel machine running mac OS 11. I see though the above and the log you have a new ARM based machine, so as it stands I cannot reproduce the error you see, unless I can have a go on your new machine sometime..
comment:4 Changed 3 years ago by cjones051073 (Chris Jones)
Cc: | cjones051073 added |
---|
comment:5 Changed 3 years ago by kesterlester
Ah - yes it could be an M1-mac based problem. Although I have been using macports successfully on the M1 for a few months, it is true that this is the first time I asked for this particular package to be installed. [It's a dependency of pdftk-java , which is the actual port I need. ]
OK - no time pressure so probably best to wait till I am next visiting you, then you can have a go in person. We could perhaps set up a remote desktop to try it sooner, but that's probably more faff than required, particularly as there is no time-pressure here.
Thanks for taking an initial look.
Let's rejoin this thread again in early September.
comment:6 follow-ups: 7 8 Changed 3 years ago by ylluminarious (George Plymale II)
Same exact error is occurring for me as well. I'd really appreciate it if this could be fixed, since I also rely on on the pdftk-java
port.
Replying to kesterlester:
Ah - yes it could be an M1-mac based problem. Although I have been using macports successfully on the M1 for a few months, it is true that this is the first time I asked for this particular package to be installed. [It's a dependency of pdftk-java , which is the actual port I need. ]
I'm not running on an M1 Mac. So ARM is not the issue.
Replying to cjones051073:
Just had a go installing this and it works fine for me on an intel machine running mac OS 11. I see though the above and the log you have a new ARM based machine [...]
I've reproduced this on Intel hardware, so apparently the architecture involved is not the issue here.
comment:7 Changed 3 years ago by kesterlester
Replying to ylluminarious:
Same exact error is occurring for me as well. I'd really appreciate it if this could be fixed, since I also rely on on the
pdftk-java
port. I'm not running on an M1 Mac. So ARM is not the issue.
OK - that's interesting. As it happens @cjones051073 and I were intending to (re)look at this two days ago (Wednesday) for the first time in ages, but ran out of time to do so. The greater part of the wait was caused by assuming we'd need the ARM machine present to test the issue. However your input suggests that is no required. In which case, since it doesn't show up on intel for @cjones051073, but does show up on intel for @ylluminarious, and since CJ knows more about fixing ports than I do, I'm assuming that CJ will end up needing some more information from YL .....
comment:8 Changed 3 years ago by cjones051073 (Chris Jones)
Replying to ylluminarious:
Same exact error is occurring for me as well. I'd really appreciate it if this could be fixed, since I also rely on on the
pdftk-java
port.Replying to kesterlester:
Ah - yes it could be an M1-mac based problem. Although I have been using macports successfully on the M1 for a few months, it is true that this is the first time I asked for this particular package to be installed. [It's a dependency of pdftk-java , which is the actual port I need. ]
I'm not running on an M1 Mac. So ARM is not the issue.
Replying to cjones051073:
Just had a go installing this and it works fine for me on an intel machine running mac OS 11. I see though the above and the log you have a new ARM based machine [...]
I've reproduced this on Intel hardware, so apparently the architecture involved is not the issue here.
I cannot reproduce it myself here on Intel, so you are going to have to provide more details for us to understand what is going on. Please post a complete log file from a clean build attempt.
comment:9 Changed 3 years ago by cjones051073 (Chris Jones)
kesterlester - The error from your log is
:info:build [ERROR] COMPILATION ERROR : 11235 :info:build [INFO] ------------------------------------------------------------- 11236 :info:build [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 11237 :info:build [INFO] 1 error 11238 :info:build [INFO] ------------------------------------------------------------- 11239 :info:build [INFO] ------------------------------------------------------------------------ 11240 :info:build [INFO] BUILD FAILURE 11241 :info:build [INFO] ------------------------------------------------------------------------ 11242 :info:build [INFO] Total time: 24.524 s 11243 :info:build [INFO] Finished at: 2021-08-16T13:09:13+01:00 11244 :info:build [INFO] ------------------------------------------------------------------------ 11245 :info:build [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project commons-lang3: Compilation failure 11246 :info:build [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 11247 :info:build [ERROR] 11248 :info:build [ERROR] -> [Help 1] 11249 :info:build [ERROR] 11250 :info:build [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 11251 :info:build [ERROR] Re-run Maven using the -X switch to enable full debug logging. 11252 :info:build [ERROR] 11253 :info:build [ERROR] For more information about the errors and possible solutions, please read the following articles: 11254 :info:build [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 11255 :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_commons-lang3/commons-lang3/work/commons-lang3-3.11-src" && mvn3 -Dmaven.repo.local=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_commons-lang3/commons-lang3/work/commons-lang3-3.11-src/.m2/repository -Drat.ignoreErrors=true -DskipTests
what JDKs environment(s) do you have installed ? I am using the MacPorts openjdk11 env
s > javac --version javac 11.0.12
comment:10 Changed 3 years ago by kesterlester
Christophers-M1:~ lester$ port installed | grep jdk Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. openjdk11 @11.0.12_0 (active) openjdk11-zulu @11.50.19_0 (active) openjdk16 @16.0.2_0 (active) openjdk16-zulu @16.32.15_0 (active) Christophers-M1:~ lester$ javac --version javac 16.0.2 Christophers-M1:~ lester$ which javac /usr/bin/javac Christophers-M1:~ lester$
comment:11 Changed 3 years ago by cjones051073 (Chris Jones)
Thanks. I am away from my mac for the weekend, so cannot try this myself, but could you try removing the openjdk16 versions such that openjdk11 is then used, and see if that helps ?
comment:12 Changed 3 years ago by kesterlester
I mac uninstalled openjdk16 and openjdk16-zulu and then tried to rebuild the troublesome port, but still had the same problem as before.
However, I note that despite my removing the above packages, `javac --version' still reports "javac 16.0.2" and I think that's because /usr/bin/javac is not provided by mac ports.
E.g. this:
Christophers-M1:~ lester$ ls /Library/Java/JavaVirtualMachines/ | cat jdk-11.0.12.jdk jdk-16.0.2.jdk openjdk11-zulu Christophers-M1:~ lester$
suggests that I am now down to just two non-macports jdks, plus one (ver 11) macports jdk, and the fourth (ver 16) macports jdk is gone.
javas giving me the ver16 non macports jdk. I don't know what the offending "port install" is doing internally.
comment:13 Changed 3 years ago by cjones051073 (Chris Jones)
OK. I can reproduce the build failure if I install openjdk16, so get
Oberon ~/Projects/MacPorts/ports > javac -version javac 16.0.2
and uninstalling that so 11 is used works again.
I am afraid you are likely hitting a bug in macOS 11 itself that prevents macports correctly picking the java version it needs
https://trac.macports.org/ticket/61445
I think your only option for no is to uninstall the non-macports JDK you are using, however you installed that, and try against with only macports openjdk 11.
comment:14 Changed 3 years ago by Chris Jones <jonesc@…>
comment:15 Changed 3 years ago by cjones051073 (Chris Jones)
Actually, could you update your ports such that you have https://github.com/macports/macports-ports/commit/010e3301d00bb8b759f96928a42d47c0d390d8e3 and try again ?
comment:16 Changed 3 years ago by cjones051073 (Chris Jones)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Seems with the above it built fine on the builedbot, so eventually you should just get the binary install.
https://build.macports.org/builders/ports-11_arm64-builder/builds/29597
Going to close as seems fixed to me now.
comment:17 Changed 3 years ago by cjones051073 (Chris Jones)
Just to end this, it seems the big that was in early versions of macOS 11 has since been resolved, as I now see correct behaviour with java_home
Oberon ~/Projects/MacPorts/ports > /usr/libexec/java_home -v 11 /Library/Java/JavaVirtualMachines/openjdk11-temurin/Contents/Home Oberon ~/Projects/MacPorts/ports > /usr/libexec/java_home -v 11+ /Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home Oberon ~/Projects/MacPorts/ports > /usr/libexec/java_home -v 16 /Library/Java/JavaVirtualMachines/openjdk16-temurin/Contents/Home
commons-lang3 was rfepviously using 11+
to select its JDK, which allowed SDK 16 to be picked. I've changed it to an explicit 11
.
comment:18 Changed 3 years ago by kesterlester
I confirm I was able to get a successful install of commons-lang3
and pdftk-java
using the commands below and without having to remove any non-macports installed JDKs.
port selfupdate port install commons-lang3 port install pdftk-java
Great! All fixed!
This is the log-file referred to in the first post as /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_java_commons-lang3/commons-lang3/main.log