Commit af8829d2 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 f09ff171
...@@ -11,12 +11,13 @@ clean: clean-no-dracut ...@@ -11,12 +11,13 @@ clean: clean-no-dracut
bin/metadata-collect-agent: bin/metadata-collect-agent:
echo $(DUMB) # the "shell sed" seems not to be executed without the DUMB variable being used 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/ ;\ install -d bin/ ;\
mkdir -p build/ ;\ mkdir -p build/ ;\
cp -r installation/metadata-collect-agent/ build/ ;\ cp -r installation/metadata-collect-agent/ build/ ;\
mkdir -p build/metadata-collect-agent/logs ;\ 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 ;\ cd build/metadata-collect-agent ;\
make make
install -m 744 build/metadata-collect-agent/metadata-collect-agent bin/ install -m 744 build/metadata-collect-agent/metadata-collect-agent bin/
......
...@@ -37,7 +37,7 @@ RUNPATHS = $(RUNPATH_FMTLIB) $(RUNPATH_OPENSSL) ...@@ -37,7 +37,7 @@ RUNPATHS = $(RUNPATH_FMTLIB) $(RUNPATH_OPENSSL)
#EXE = main #EXE = main
#CXX = g++ #CXX = g++
#CPPFLAGS = -O2 -g -Wno-unused-result -Wsign-compare -pthread $(INCLUDE_DIRS) $(LDLIBS) $(LIBRARY_DIRS) $(RUNPATHS) #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 += -Wl,--unresolved-symbols=ignore-all
LDFLAGS = $(LIBRARY_DIRS) $(RUNPATHS) LDFLAGS = $(LIBRARY_DIRS) $(RUNPATHS)
LDLIBS = -lcrypto -lfmt LDLIBS = -lcrypto -lfmt
...@@ -45,7 +45,16 @@ EXT_SUFFIX := $(shell python3 -c "import sysconfig; print(sysconfig.get_config_v ...@@ -45,7 +45,16 @@ EXT_SUFFIX := $(shell python3 -c "import sysconfig; print(sysconfig.get_config_v
EXT = $(EXE)$(EXT_SUFFIX) EXT = $(EXE)$(EXT_SUFFIX)
# Build without Python runtime # 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 %.cpp: %.pyx
$(info "[Cython Compiling $^ -> $@]") $(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