Ethereal
Ethereal copied to clipboard
Missing -static in CFLAGS?
Hi Andrew,
the compilation with
mingw32-make pgo
on Windows 10 with MSYS2 CLANG64 (clang: 18.1.8, Target: x86_64-w64-windows-gnu, Thread model: posix) is successful, you can run the created 64bit executable (Ethereal.exe) without problems in the MSYS2 environment.
But, if you try to run the executable outside of the MSYS2 environment there is an error that the libwinpthread-1.dll is missing.
I solved it by changing line 45 in the makefile
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native
to
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native -static
Or even better here
...
RFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -static
CFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native
TFLAGS = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native -fopenmp -DTUNE
PGOFLAGS = -fno-asynchronous-unwind-tables
ifeq ($(MSYSTEM), CLANG64)
CFLAGS += -static
endif
...