Commit 6582076e authored by Ophélie Gagnard's avatar Ophélie Gagnard

WIP: Fix the Cython+ code in order to fix all warnings at compile time in the produced C++ code.

Add debug and options in Makefiles.

Reason: OBS' VM has some -Werror= options causing the compilation to fail.
parent 2e238b3c
......@@ -11,12 +11,13 @@ clean: clean-no-dracut
bin/metadata-collect-agent:
echo $(DUMB) # the "shell sed" seems not to be executed without the DUMB variable being used
#Error expected here (line -g++ ...), writing a C program using the error messages
# Error expected here (line -g++ ...), writing a C program using the error messages
# note: it copies the .cpp if present, but copies the .pyx otherwise (and fails if the system cannot compile a Cython+ program the way it is attempter)
install -d bin/ ;\
mkdir -p build/ ;\
cp -r installation/metadata-collect-agent/ build/ ;\
mkdir -p build/metadata-collect-agent/logs ;\
cp src/main.cpp build/metadata-collect-agent/
cp src/main.cpp build/metadata-collect-agent/ || cp src/main.pyx build/metadata-collect-agent/
cd build/metadata-collect-agent ;\
make
install -m 744 build/metadata-collect-agent/metadata-collect-agent bin/
......
......@@ -37,7 +37,7 @@ RUNPATHS = $(RUNPATH_FMTLIB) $(RUNPATH_OPENSSL)
#EXE = main
#CXX = g++
#CPPFLAGS = -O2 -g -Wno-unused-result -Wsign-compare -pthread $(INCLUDE_DIRS) $(LDLIBS) $(LIBRARY_DIRS) $(RUNPATHS)
CPPFLAGS = -pthread
CPPFLAGS = -pthread -Wall -Wextra -Werror
#LDFLAGS += -Wl,--unresolved-symbols=ignore-all
LDFLAGS = $(LIBRARY_DIRS) $(RUNPATHS)
LDLIBS = -lcrypto -lfmt
......@@ -45,7 +45,16 @@ EXT_SUFFIX := $(shell python3 -c "import sysconfig; print(sysconfig.get_config_v
EXT = $(EXE)$(EXT_SUFFIX)
# Build without Python runtime
all: metadata-collect-agent
all: metadata-collect-agent dev
dev:
echo dev:
echo LINK.cc = CXX CXXFLAGS CPPFLAGS LDFLAGS TARGET_ARCH
echo CXX = $(CXX)
echo CXXFLAGS = $(CXXFLAGS)
echo CPPFLAGS = $(CPPFLAGS)
echo LDFLAGS = $(LDFLAGS)
echo TARGET_ARCH = $(TARGET_ARCH)
%.cpp: %.pyx
$(info "[Cython Compiling $^ -> $@]")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment