Skip to content

Commit

Permalink
Try to fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Oct 18, 2023
1 parent 61c1a5c commit 13bb929
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ ac_ct_CC
LDFLAGS
AR
R_CPPFLAGS
RANLIB
MAKE
CPPFLAGS
CXXPICFLAGS
CPICFLAGS
Expand Down Expand Up @@ -2413,6 +2415,10 @@ CXXPICFLAGS=`"${R_HOME}/bin/R" CMD config CXXPICFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
MAKE=`"${R_HOME}/bin/R" CMD config MAKE`
RANLIB=`"${R_HOME}/bin/R" CMD config RANLIB`
R_CPPFLAGS=`"${R_HOME}/bin/R" CMD config --cppflags`
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ AC_SUBST(CXXFLAGS, `"${R_HOME}/bin/R" CMD config CXXFLAGS`)
AC_SUBST(CPICFLAGS, `"${R_HOME}/bin/R" CMD config CPICFLAGS`)
AC_SUBST(CXXPICFLAGS, `"${R_HOME}/bin/R" CMD config CXXPICFLAGS`)
AC_SUBST(CPPFLAGS, `"${R_HOME}/bin/R" CMD config CPPFLAGS`)
AC_SUBST(MAKE, `"${R_HOME}/bin/R" CMD config MAKE`)
AC_SUBST(RANLIB, `"${R_HOME}/bin/R" CMD config RANLIB`)
AC_SUBST(R_CPPFLAGS, `"${R_HOME}/bin/R" CMD config --cppflags`)

dnl seems unreliable as to whether this information is available
Expand Down
1 change: 1 addition & 0 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export PKG_CPICFLAGS=@CPICFLAGS@
export PKG_CXXPICFLAGS=@CXXPICFLAGS@
export PKG_CPPFLAGS=@CPPFLAGS@
export PKG_R_CPPFLAGS=@R_CPPFLAGS@
export RANLIB=@RANLIB@

ZSTD_LIB=@ZSTD_LIB@
BLOSC_LIB=@BLOSC_LIB@
Expand Down
18 changes: 8 additions & 10 deletions src/Makevars.win.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ export CC=@CC@
export PKG_CFLAGS=@CFLAGS@
export PKG_CPICFLAGS=@CPICFLAGS@
export CXX=@CXX@
#export PKG_CXXFLAGS=`R CMD config CXXFLAGS`
#export PKG_CXXPICFLAGS=`R CMD config CXXPICFLAGS`
export PKG_CPPFLAGS=@CPPFLAGS@
export PKG_R_CPPFLAGS=@R_CPPFLAGS@
#export AR=`R CMD config AR`
#export RANLIB=`R CMD config RANLIB`
#export MAKE=`R CMD config MAKE`

COMPRESSION_LIBS=compression_tools/blosc/libblosc.a
PKG_LIBS=compression_tools/zstd/libblosc.a compression_tools/zstd/libzstd.a -lz -lstdc++

PKG_LIBS=$(COMPRESSION_LIBS) -lz -lstdc++
all: $(SHLIB)

all: compression_libs $(SHLIB)
$(SHLIB): compression_libs

compression_libs: $(COMPRESSION_LIBS)
compression_libs: libblosc.a libzstd.a

compression_tools/blosc/libblosc.a:
libblosc.a: libzstd.a
$(MAKE) -C compression_tools/blosc

libzstd.a:
$(MAKE) -C compression_tools/zstd

clean:
$(MAKE) -C blosc clean
4 changes: 2 additions & 2 deletions src/compression_tools/blosc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ all: libblosc.a

libblosc.a: blosc
rm -f libblosc.a
ar cq libblosc.a $(BLOSC_OBJS) $(SNAPPY_OBJS) $(LZ4_OBJS)
ranlib libblosc.a
$(AR) cq libblosc.a $(BLOSC_OBJS) $(SNAPPY_OBJS) $(LZ4_OBJS)
$(RANLIB) libblosc.a

blosc: subdirs
$(MAKE) -C lib/blosc-1.20.1 all
Expand Down
2 changes: 1 addition & 1 deletion src/compression_tools/blosc/lib/blosc-1.20.1/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_FLAGS+=-I../lz4-1.9.2 -I../snappy-1.1.1 -I../zstd-1.4.5 @MSSE2@ @MAVX2@ -DUSING_R
EXTRA_FLAGS+=-I../lz4-1.9.2 -I../snappy-1.1.1 -I../../../zstd @MSSE2@ @MAVX2@ -DUSING_R
FLAGS=$(PKG_CFLAGS) $(PKG_CPICFLAGS) $(PKG_CPPFLAGS) $(PKG_R_CPPFLAGS) $(EXTRA_FLAGS)

BLOSC_FILES := $(sort $(wildcard *.c))
Expand Down
2 changes: 1 addition & 1 deletion src/compression_tools/zstd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all: libzstd.a
libzstd.a: $(ZSTD_OBJ)
rm -f libzstd.a
$(AR) cq libzstd.a $(ZSTD_OBJ)
ranlib libzstd.a
$(RANLIB) libzstd.a

common/debug.o: common/debug.c
$(CC) $(FLAGS) -c common/debug.c -o common/debug.o
Expand Down

0 comments on commit 13bb929

Please sign in to comment.