[MacPorts] #67147: maxima-devel @ 5.46-dev-20221029_5 +xmaxima: Git clone failed - certificate has expired
MacPorts
noreply at macports.org
Mon Apr 3 09:36:04 UTC 2023
#67147: maxima-devel @ 5.46-dev-20221029_5 +xmaxima: Git clone failed - certificate
has expired
------------------------------+--------------------
Reporter: dotnetCarpenter | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: maxima-devel |
------------------------------+--------------------
Comment (by tomio-arisaka):
Replying to [comment:11 dotnetCarpenter]:
> I haven't tried your patch but I can test it, if you want?
You don't need to apply my patch if you don't like to do.
Because it has already been verified on macOS High Sierra.
Anyway, **maxima-devel** is provided to try to use a current development
version of Maxima.
Now, over 1800 commits are applied to the development version of Maxima
after Maxima 5.46.0.
\\
> 1. `__builtin_cpu_init` is only an issue on the
[https://build.macports.org/builders/ports-10.13_x86_64-builder/ buildbot]
and not on my machine, where [https://ports.macports.org/port/sbcl/
sbcl] does build successfully.
The issue depends on the version of Apple clang.
So the resolution is to use a suitable version of clang or GCC in order to
compile **SBCL**.
[https://sourceforge.net/p/sbcl/sbcl/ci/master/tree/tools-for-build/avx2.c
avx2.c] is a file copied from **SBCL**.
This is to check **AVX2** instruction set of x86_64.
{{{
$ cat ./avx2.c
int main () {
__builtin_cpu_init();
return __builtin_cpu_supports("avx2") != 0;
}
}}}
{{{__builtin_cpu_init}}} and {{{__builtin_cpu_supports}}} are built-in
functions of GCC and clang.
But they are not available on the earlier versions of Apple clang
(included in **Xcode 9.4.1** and earlier)
{{{
$ xcodebuild -version
Xcode 9.4.1
Build version 9F2000
$
$ clang --version
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$
$ clang ./avx2.c -o ./avx2
./avx2.c:2:3: error: use of unknown builtin '__builtin_cpu_init'
[-Wimplicit-function-declaration]
__builtin_cpu_init();
^
1 error generated.
$
$ /Library/Developer/CommandLineTools/usr/bin/clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$
$ /Library/Developer/CommandLineTools/usr/bin/clang ./avx2.c -o ./avx2
$
$ echo $?
0
$
}}}
MacPorts clang also has {{{__builtin_cpu_init}}} and
{{{__builtin_cpu_supports}}}:
{{{
$ port installed 'clang*'
The following ports are currently installed:
clang-14 @14.0.6_0+analyzer+libstdcxx (active)
clang-15 @15.0.7_1+analyzer+libstdcxx (active)
clang_select @2.2_1 (active)
$
$ clang-mp-15 --version
clang version 15.0.7
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-15/bin
$
$ clang-mp-15 ./avx2.c -o ./avx2
$
$ echo $?
0
$
$ ls -lt ./avx2.c ./avx2
-rwxr-xr-x 1 manami staff 8464 4 2 07:47 ./avx2
-rw-r--r-- 1 manami staff 86 10 26 01:41 ./avx2.c
$
}}}
So you can change the value of **CC** referred to the port-file of
**SBCL** in order to use **clang-mp-15** to compile **SBCL**.
For example, next command works expectedly:
{{{
$ sudo port install sbcl configure.cc=/opt/local/bin/clang-mp-15
}}}
It seems that the port-file of **SBCL** should be modified to use MacPorts
clang instead of Apple clang.
Because **Xcode 10.1** is not available on the earlier versions of macOS
than macOS High Sierra.(e.g. macOS Sierra, OSX El Capitan)
\\
By the way, since **SBCL 2.3.3**, upstream has changed how to check
**AVX2** in order to avoid causing an error when compiling avx2.c. (AVX2
is used in SB-SIMD module)
An extract from the differences between **SBCL 2.3.2** and **SBCL 2.3.3**:
{{{
$ diff -u SBCL-2.3.2-git/sbcl-code/make-config.sh SBCL-2.3.3-git/sbcl-code
/make-config.sh
--- SBCL-2.3.2-git/sbcl-code/make-config.sh 2023-02-27
13:48:26.000000000 +0900
+++ SBCL-2.3.3-git/sbcl-code/make-config.sh 2023-03-29
16:52:31.000000000 +0900
...
...
@@ -655,8 +652,7 @@
x86-64)
printf ' :sb-simd-pack :sb-simd-pack-256 :avx2' >> $ltf # not
mandatory
- $GNUMAKE -C tools-for-build avx2
- if tools-for-build/avx2; then
+ if ! $GNUMAKE -C tools-for-build avx2 2> /dev/null || tools-for-
build/avx2 ; then
SBCL_CONTRIB_BLOCKLIST="$SBCL_CONTRIB_BLOCKLIST sb-simd"
fi
}}}
The change shows that building **SBCL** does not stop if clang fails to
compile avx2.c,
and if so, **SB-SIMD** module is not built at the same time.
So we should use a suitable version of clang or GCC in order to compile
**SBCL**.
--
Ticket URL: <https://trac.macports.org/ticket/67147#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list