New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ranlib should be run on static libs on macOS: ld: in dbarts.a, archive has no table of contents #55
Comments
This fixes the build:
I am not sure if this can be used unconditionally for every OS though. |
As an alternative, fixing flags for |
Sorry that I didn't respond to this, but I wasn't able to reproduce it
which limited my ability to test and I also wasn't sure if I could make the
fix work across platforms.
I did make a change to the makefile where it should pull in ARFLAGS from
the R environment and set them to `-cr` if it can't find them. If you could
let me know if that works, I would greatly appreciate it.
…On Sun, Dec 10, 2023 at 2:35 AM Sergey Fedorov ***@***.***> wrote:
As an alternative, fixing flags for ar so that table of contents is
generated will likely work too.
—
Reply to this email directly, view it on GitHub
<#55 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE5P4AMS6STA2S6Y36MF6TYIVQ3XAVCNFSM6AAAAAAW4HPIWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYHA4DGNBYHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@vdorie P. S. Here the identical problem was fixed via adding |
Thank you! I added |
@vdorie Thank you, awesome! |
@vdorie Does not work still with 0.9-26:
|
I’d love to help with this but it would be very helpful if there was a way
to replicate the issue locally. Is there an emulation and/or
containerization setup for Darwin PPC I might be able to use? Otherwise, I
can’t even get `ar` to not generate a table of contents on my machine,
which makes building a configure script test (my preferred solution) very
difficult.
…On Sat, Feb 3, 2024 at 9:40 PM Sergey Fedorov ***@***.***> wrote:
@vdorie <https://github.com/vdorie> Does not work still with 0.9-26:
ar rv ../rc.a bounds.o util.o
ar: creating archive ../rc.a
a - bounds.o
a - util.o
/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 dbarts.so R_C_interface.o R_interface.o R_interface_common.o R_interface_crossvalidate.o R_interface_rbart.o R_interface_sampler.o crossvalidate.o guessNumCores.o makeModelMatrixFromDataFrame.o dbarts.a external.a misc.a rc.a -pthread -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: in dbarts.a, archive has no table of contents
collect2: error: ld returned 1 exit status
make: *** [dbarts.so] Error 1
—
Reply to this email directly, view it on GitHub
<#55 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE5P4CPOYZNSSBVDXLK7OTYR3YKNAVCNFSM6AAAAAAW4HPIWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGU2TONZVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@vdorie Did the last CRAN release have |
In the version on CRAN the flags should default to "-crs" unless ARFLAGS is
non-empty, so if it is still failing that might be why. It looks like the
flags are set to 'rv', right?
…On Thu, Feb 8, 2024 at 2:37 PM Sergey Fedorov ***@***.***> wrote:
@vdorie <https://github.com/vdorie> Did the last CRAN release have s
added to ar flags? That should work, and it is according to ar
documentation (nothing exclusive to macOS). It looks like newer versions of
ar pretend the flag was passed even if it was not, and generate the table
regardless. I do not see any reason to do it conditionally, to be honest.
—
Reply to this email directly, view it on GitHub
<#55 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE5P4GLQJY2KJCQRUI4FCDYSUSQRAVCNFSM6AAAAAAW4HPIWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUHAYTIOBUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hmm, interesting. I definitely did not pass arflags manually. I also do not think Macports should be passing that. |
We do use CRAN version: https://github.com/macports/macports-ports/blob/7518a78ed00d82d1e8164258d7f921cfbf421c28/R/R-dbarts/Portfile#L7 It still fails without a patch adding |
The text was updated successfully, but these errors were encountered: