Closed barracuda156 closed 5 months ago
1.2.2 does not disable atomics EVEN THOUGH IT PASSES -DDISABLE_ATOMICS FLAG, it but does not pass -latomic, and now it is just broken
Please refrain from using capitals like this, it's an unnecessary and frankly unacceptable tone for open source.
It's likely an issue with compiler & version detection, what output do you get from:
/opt/local/bin/g++-mp-13 -dumpfullversion -dumpversion 2>&1
echo | /opt/local/bin/g++-mp-13 -dM -E - | grep -i __clang__
@andrjohns The issue is that configure script does not query the compiler which is used by R
but picks a default OS compiler (which of course may differ).
Since Xcode compiler is gcc-4.2 on 10.6, it fails the check, and tries to disable atomics.
I am not sure why 1.2.2 had that broken though, and disabling does not disable it.
Once I replaced $(CXX)
with the actual compiler used, 1.2.2 compiled with no issues:
---> Configuring R-QuickJSR
Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-QuickJSR/R-QuickJSR/work/QuickJSR" && /opt/local/bin/R CMD build . --no-manual --no-build-vignettes --keep-empty-dirs
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘QuickJSR’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking vignette meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘QuickJSR_1.2.2.tar.gz’
---> Building R-QuickJSR
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-QuickJSR/R-QuickJSR/work/build
Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-QuickJSR/R-QuickJSR/work/QuickJSR" && /opt/local/bin/R CMD INSTALL . --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-QuickJSR/R-QuickJSR/work/build --install-tests
* installing *source* package ‘QuickJSR’ ...
file ‘src/Makevars’ has the wrong MD5 checksum
** using staged installation
** libs
using C++ compiler: ‘g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0’
Warning in system2("xcrun", "--show-sdk-path", TRUE, TRUE) :
running command ''xcrun' --show-sdk-path 2>&1' had status 64
using SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -c quickjsr.cpp -o quickjsr.o
/opt/local/bin/g++-mp-13 -std=gnu++17 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -c init.cpp -o init.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/cutils.c -o quickjs/cutils.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/libbf.c -o quickjs/libbf.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/libregexp.c -o quickjs/libregexp.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/libunicode.c -o quickjs/libunicode.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/quickjs.c -o quickjs/quickjs.o
/opt/local/bin/gcc-mp-13 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"../inst/include/" -I"../inst/include/quickjs" -I/opt/local/include/LegacySupport -D_GNU_SOURCE -DCONFIG_BIGNUM -DCONFIG_VERSION=\"2024-01-13\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -pipe -Os -arch ppc -DFALSE=0 -DTRUE=1 -DSTRICT_R_HEADERS -funsigned-char -fwrapv -std=gnu11 -c quickjs/quickjs-libc.c -o quickjs/quickjs-libc.o
ar -rs ../inst/lib//libquickjs.a quickjs/cutils.o quickjs/libbf.o quickjs/libregexp.o quickjs/libunicode.o quickjs/quickjs.o quickjs/quickjs-libc.o
ar: creating archive ../inst/lib//libquickjs.a
/opt/local/bin/g++-mp-13 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -Wl,-rpath,/opt/local/lib/libgcc -arch ppc -o QuickJSR.so quickjsr.o init.o ../inst/lib//libquickjs.a -L/opt/local/lib -lMacportsLegacySupport -latomic -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-QuickJSR/R-QuickJSR/work/build/00LOCK-QuickJSR/00new/QuickJSR/libs
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (QuickJSR)
Please refrain from using capitals like this
@andrjohns I am sorry, I was typing from an archaic browser where setting italics does not work -_- (No modern browsers on powerpc at the moment.) You are right, I should not have used it at all.
I have fixed that now.
It's likely an issue with compiler & version detection
It is, but because the script does not pick the compiler which is used by R
and by the build. If I manually replace it to be /opt/local/bin/g++-mp-13
, the check works as expected.
36-178% /opt/local/bin/g++-mp-13 -dumpfullversion -dumpversion 2>&1
13.2.0
36-178% echo | /opt/local/bin/g++-mp-13 -dM -E - | grep -i __clang__
But:
36-178% g++ -dumpfullversion -dumpversion 2>&1
4.2.1
@andrjohns Thank you very much!
@andrjohns Looks like atomics detection back to being broken. I did not notice it with 1.2.0, because it turns out that it sets to disable it:
Which is wrong, of course.
1.2.2 does not disable atomics even though it passes
-DDISABLE_ATOMICS
flag, it but does not pass-latomic
, and now it is just broken: