Skip to content

Commit 40794ac

Browse files
authored
Set glog as a comm dependency (#38)
For some unknown reason the linker is not resolving all symbols so the library crashes at run-time when trying to load them. This PR is adding the missing dependency and setting ` --no-undefined` to catch/prevent this kind of issues in the future. Passenger: I'm also adding a missing header to the shipped ones
1 parent c53c545 commit 40794ac

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

SConstruct

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ env = Environment(
4747
# otherwise e.g. '/bin/protoc' would be called and the latter would produce
4848
# *.pb.* of a version different from the one of $PROTOBUF_INCLUDE dir.
4949
ENV = {'PATH' : os.environ['PATH']},
50-
CXXFLAGS="-std=c++2a " + FFLAGS + OPTFLAGS + WFLAGS
50+
CXXFLAGS="-std=c++2a " + FFLAGS + OPTFLAGS + WFLAGS,
51+
LINKFLAGS=['-Wl,--no-undefined']
5152
)
5253
# env.MergeFlags(GetOption('cflags'))
5354

@@ -58,7 +59,7 @@ comm_env.Replace(
5859
os.getenv('GLOG_INCLUDE', default=''),
5960
os.getenv('PROTOBUF_INCLUDE', default='')
6061
],
61-
LIBS = [],
62+
LIBS = ['glog'],
6263
LIBPATH = []
6364
)
6465

github_release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ upload_custom_release_file() {
4646
docker exec aperturedb bash -c "cp /aperturedb-client/lib/* /x64"
4747
docker exec aperturedb bash -c "mkdir -p /comm; cp /aperturedb-client/include/comm/* /comm"
4848
docker exec aperturedb bash -c "mkdir -p /aperturedb; cp /aperturedb-client/include/aperturedb/* /aperturedb"
49+
docker exec aperturedb bash -c "mkdir -p /util; cp /aperturedb-client/include/util/Macros.h /util/Macros.h"
4950
docker cp aperturedb:/x64/ /tmp/aperturedb-cpp/lib/
5051
docker cp aperturedb:/comm/ /tmp/aperturedb-cpp/include/
5152
docker cp aperturedb:/aperturedb/ /tmp/aperturedb-cpp/include/
53+
docker cp aperturedb:/util/ /tmp/aperturedb-cpp/include/
5254

5355
tar -cvzf libs_64.tgz -C /tmp aperturedb-cpp
5456
docker stop aperturedb

0 commit comments

Comments
 (0)