#67387 closed defect (fixed)

Some R ports opportunistically link to oneTBB if it is installed

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: R-RcppParallel

Description

Some ports known to be affected:

R-bayesGAM R-rstanarm R-ctsem R-cbq R-blavaan R-bayesbr

This showed up upon upgrade of oneTBB as it was moved into libexec. I.e.:

Could not open /opt/local/lib/libtbbmalloc.2.dylib: Error opening or reading file (referenced from /opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/cbq/libs/cbq.so)

Likely it can be fixed now with revbump of R-RcppParallel dependents.

Change History (3)

comment:1 Changed 18 months ago by barracuda156

Needs to be investigated. Maybe linking should be fixed instead.

comment:2 Changed 18 months ago by barracuda156

Okay, that is genuinely opportunistic linking, code is correct:

/opt/local/bin/g++-mp-12 -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 -Wl,-rpath,/opt/local/lib/libgcc -L/opt/local/lib -lMacportsLegacySupport -arch ppc -o cbq.so RcppExports.o stanExports_cbqb.o stanExports_cbqbv.o stanExports_cbqd.o stanExports_cbqdv.o stanExports_cbqfixb.o stanExports_cbqfixbv.o stanExports_cbqfixd.o stanExports_cbqfixdv.o stanExports_cbqpanelb.o stanExports_cbqpanelbv.o stanExports_cbqpaneld.o stanExports_cbqpaneldv.o stanExports_cbqrandomb.o stanExports_cbqrandombv.o stanExports_cbqrandomd.o stanExports_cbqrandomdv.o -L/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/RcppParallel/lib/ -Wl,-rpath,/opt/local/Library/Frameworks/R.framework/Versions/4.3/Resources/library/RcppParallel/lib/ -ltbb -ltbbmalloc -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

At the same time, after current update of oneTBB this should not occur, since libexec will not be in default search path. I assume.

comment:3 Changed 18 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 5477d7d5c274b428c249889140e38c01633b764f/macports-ports (master):

Revbump R-RcppParallel deps after oneTBB change to fix opportunistic linking

Fixes: #67387

Note: See TracTickets for help on using tickets.