Skip to content

Atomic test does not work correctly #1

@barracuda156

Description

@barracuda156

Running the build on ppc (i.e. 32-bit), I get this:

--->  Building R-qs2
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-qs2/R-qs2/work/build
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-qs2/R-qs2/work/qs2" && /opt/local/bin/R CMD INSTALL . --configure-args="--without-simd --with-TBB" --library=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-qs2/R-qs2/work/build --install-tests 
* installing *source* package ‘qs2’ ...
** package ‘qs2’ successfully unpacked and MD5 sums checked
** using staged installation
checking for pkg-config... /opt/local/bin/pkg-config
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/local/bin/g++-mp-13 -std=gnu++17 accepts -g... yes
C++ compiler: /opt/local/bin/g++-mp-13 -std=gnu++17
zstd 1.5.6 library detected -- skipping zstd compilation
Fixed blocksize
Using TBB
Does not require -latomic flag
configure: creating ./config.status
config.status: creating src/Makevars

However, ppc requires -latomic in order to support 64-bit atomics.
Needless to say, in result Makevars do not get the flag:

PKG_CPPFLAGS=-DRCPP_USE_UNWIND_PROTECT -DRCPP_NO_RTTI -DRCPP_NO_SUGAR -I../inst/include -I.    -DIS_UTF8_LOCALE=$(shell "${R_HOME}/bin/Rscript" -e "cat(as.integer(identical(utils::localeToCharset()[1], 'UTF-8')))")
PKG_CXXFLAGS =  $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::CxxFlags()")
PKG_LIBS = -L.  -L/opt/local/lib -lzstd $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()")

LIBZSTD = ZSTD/zstd.o

$(SHLIB): 

libQSZSTD.a: $(LIBZSTD)
	$(AR) rcs libQSZSTD.a $(LIBZSTD)

clean:
	rm -f $(SHLIB) $(OBJECTS) 

I am not sure why, but the test gives an inaccurate result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions