Skip to content

Commit d194649

Browse files
committed
Rename "libsapporo.so" and "libsapporo.a"
In Conda environments for AMUSE where Sapporo Light has already been installed and Sapporo 2 is being installed after that, we will run into problems when building the "tests" folder or executing its code. This is shown from e.g. "ldd libsapporoG6.so": " libsapporo.so => /My/path/to/conda/envs/amuse_p313/lib/libsapporo.so " i.e. it will point to the shared object for Sapporo Light and not to the shared object for Sapporo 2. By renaming "libsapporo.so" to "libsapporo2.so" and "libsapporo.a" to "libsapporo2.a" this problem can be avoided.
1 parent 7f613c9 commit d194649

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CUDA_TK ?= $(CUDA_PATH)
1010
endif
1111

1212
.PHONY: all
13-
all: libsapporo.a libsapporo.so emulated_interfaces
13+
all: libsapporo2.a libsapporo2.so emulated_interfaces
1414

1515

1616
# Detect CUDA
@@ -156,10 +156,10 @@ src/sapporohostclass.o: $(KERNELS)
156156
%.o: %.cpp
157157
$(CXX) $(CXXFLAGS) -c $< -o $@
158158

159-
libsapporo.a: $(OBJS)
159+
libsapporo2.a: $(OBJS)
160160
ar qv $@ $^
161161

162-
libsapporo.so: $(OBJS)
162+
libsapporo2.so: $(OBJS)
163163
$(CXX) -o $@ -shared $^ $(LDFLAGS)
164164

165165

@@ -171,20 +171,20 @@ EMU_SHARED_LIBS := $(EMU_SRC:src/interfaces/%lib.cpp=lib%.so)
171171
.PHONY: emulated_interfaces
172172
emulated_interfaces: $(EMU_STATIC_LIBS) $(EMU_SHARED_LIBS)
173173

174-
$(EMU_STATIC_LIBS): libsapporo.a
174+
$(EMU_STATIC_LIBS): libsapporo2.a
175175

176-
$(EMU_SHARED_LIBS): libsapporo.so
176+
$(EMU_SHARED_LIBS): libsapporo2.so
177177

178178

179179
lib%.a: src/interfaces/%lib.o
180180
ar qv $@ $^
181181

182182
lib%.so: src/interfaces/%lib.o
183-
$(CXX) -o $@ -shared $^ -L. -lsapporo $(LDFLAGS)
183+
$(CXX) -o $@ -shared $^ -L. -lsapporo2 $(LDFLAGS)
184184

185185

186186
# Installation
187-
INSTALLED_LIBS := $(PREFIX)/lib/libsapporo.a $(PREFIX)/lib/libsapporo.so
187+
INSTALLED_LIBS := $(PREFIX)/lib/libsapporo2.a $(PREFIX)/lib/libsapporo2.so
188188
INSTALLED_LIBS += $(EMU_STATIC_LIBS:%.a=$(PREFIX)/lib/%.a)
189189
INSTALLED_LIBS += $(EMU_SHARED_LIBS:%.so=$(PREFIX)/lib/%.so)
190190

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ F90 ?= ifort
66
.SUFFIXES: .o .cpp .ptx .cu
77

88
SAPPOROPATH=..
9-
SAPLIB2 = sapporo
9+
SAPLIB2 = sapporo2
1010
SAPLIB = lib$(SAPLIB2).a
1111
SAPLIBG6 = sapporoG6
1212

0 commit comments

Comments
 (0)