Commit 598e92ab authored by Ophélie Gagnard's avatar Ophélie Gagnard

Fix a bug in Makefile. Improve the detection test of go in the system in...

Fix a bug in Makefile. Improve the detection test of go in the system in install.sh (may be further improved).
parent 0560b794
......@@ -47,8 +47,8 @@ apt -y install cmake
## Install Go
# needed for dracut.module/ make install
if ! which go ; then
GOVERSION=1.16.5
GOVERSION=1.16.5
if [ ! -e "/usr/local/go/VERSION" ] || [ go${GOVERSION} != $(cat /usr/local/go/VERSION) ]; then
wget https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf go${GOVERSION}.linux-amd64.tar.gz
......
......@@ -2,7 +2,6 @@
ifeq (,)
INCLUDE_DIRS = -I/usr/include/python3.7
PYTYON_PATH = /opt/python-3.7.12/include/python3.7m/
else
......@@ -50,10 +49,10 @@ run: $(EXT)
nopython: main.cpp#$(EXE)
mkdir -p logs
# Error expected here, writing a C program using the error messages
-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I$(PYTHON_PATH) main.cpp -lcrypto -lfmt -o main 2> logs/link_errors
-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I/opt/python-3.7.12/include/python3.7m/ main.cpp -lcrypto -lfmt -o main 2> logs/link_errors
./parse_link_errors.py < logs/link_errors
make fake_python.o
g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I$(PYTHON_PATH) main.cpp fake_python.o -lcrypto -lfmt -o metadata-collect-agent
g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I/opt/python-3.7.12/include/python3.7m/ main.cpp fake_python.o -lcrypto -lfmt -o metadata-collect-agent
#-ln -f ../../metadata-collect-agent metadata-collect-agent
-ln -f metadata-collect-agent ../../dracut.module/90metadata-collect/metadata-collect-agent
#-ln -f metadata-collect-agent ../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
......
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