Open rapenne-s opened 3 years ago
Hi, thanks for trying this out on OpenBSD!
That specific function is only used in a Windows-only replacement implementation of a POSIX function, and there's a PLATFORMUNIX
def-guard in front of it that should prevent it from being compiled on other operating systems. Looking at the compiler arguments, there are quite a few missing from what I would expect. In particular -DPLATFORMDEBIAN64
is missing, which explains why in turn PLATFORMUNIX
is not defined. (The Makefile currently distinguishes between "windows", "osx" and "debian", treating all operating systems that aren't named "Windows_NT" or "Darwin" as the latter. If needed we could add -DPLATFORMBSD64
or something like that, but for now PLATFORMDEBIAN64
should suffice.)
I think something is overriding the CFLAGS
variable set by our Makefile, perhaps an environment variable of the same name or a command line override. Are you running make CFLAGS=-I/usr/X11R6/include/
by any chance? If so I think you can achieve what you want by running make IFLAGS_CONFIG="-I/usr/X11R6/include/"
instead, or equivalently by adding the line
IFLAGS_CONFIG = -I/usr/X11R6/include/
to a file named .config.make in the same folder as the Makefile.
Hi, thank you for your reply.
I added IFLAGS_CONFIG=-I/usr/X11R6/include/
in .config.make
.
This let the build continues a bit further but I ultimately get an error on a clang++ invocation without my -I flag, while the previous clang++ call has the correct flags sets.
I run the build with gmake CC=clang CXX=clang++
clang++ -std=c++11 -MT .obj/src/engine/selectorcontext.o -MMD -MP -MF .dep/src/engine/selectorcontext.Td -O3 -s -pedantic -pedantic-errors -Wall -Wextra -pthread -DPLATFORMDEBIAN64 -DSELF_PATCH_ENABLED=false -I ./ -I src/action/ -I src/ai/ -I src/audio/ -I src/build/ -I src/common/ -I src/edit/ -I src/engine/ -I src/essai/ -I src/graphics/ -I src/interface/ -I src/logic/ -I src/main/ -I src/message/ -I src/network/ -I src/shaders/ -I src/user/ -I/usr/X11R6/include/ -o .obj/src/engine/selectorcontext.o -c src/engine/selectorcontext.cpp
clang++: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
In file included from src/engine/selectorcontext.cpp:25:
In file included from src/common/source.hpp:45:
In file included from ./libs/plog/Log.h:7:
In file included from ./libs/plog/Logger.h:2:
In file included from ./libs/plog/Appenders/IAppender.h:2:
In file included from ./libs/plog/Record.h:4:
./libs/plog/Util.h:134:9: warning: non-void function does not return a value [-Wreturn-type]
}
^
1 warning generated.
mv -f .dep/src/engine/selectorcontext.Td .dep/src/engine/selectorcontext.d
clang++ -std=c++11 -MT .obj/libs/imgui/imgui_impl_opengl2.o -MMD -MP -MF .dep/libs/imgui/imgui_impl_opengl2.Td -O3 -s -I ./ -o .obj/libs/imgui/imgui_impl_opengl2.o -c libs/imgui/imgui_impl_opengl2.cpp
clang++: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
libs/imgui/imgui_impl_opengl2.cpp:52:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
^~~~~~~~~
1 error generated.
gmake: *** [Makefile:867 : .obj/libs/imgui/imgui_impl_opengl2.o] Erreur 1
I've adjusted the Makefile so that IFLAGS_CONFIG
variable is also used for the source files in libs/. Could you try again with the latest Makefile?
I've been able to go further with your help, I have another issue now that I haven't been to understand.
[...]
1 warning generated.
mv -f .dep/.pic/src/common/version.Td .dep/.pic/src/common/version.d
clang++ -std=c++11 -MT .obj/.o -MMD -MP -MF .dep/.Td -o bin/sanitychecker .obj/src/build/sanitychecker.o .obj/.pic/src/common/.cu-common.o .obj/.pic/src/common/dictator.o .obj/.pic/src/common/version.o .obj/.pic/src/logic/.cu-automaton.o .obj/.pic/src/logic/.cu-logic.o .obj/.pic/src/logic/bible.o .obj/.pic/libs/jsoncpp/jsoncpp.o -Wl,-rpath,'$ORIGIN' -lstdc++ -O3 -lz -lm -pthread
clang++ -std=c++11 -MT .obj/.o -MMD -MP -MF .dep/.Td -o bin/game .obj/src/main/.cu-discord.o .obj/src/main/.cu-menu.o .obj/src/main/.cu-online.o .obj/src/main/main.o .obj/src/main/mainmenu.o .obj/src/main/messageinjector.o .obj/src/main/multiplayermenu.o .obj/src/main/settingsmenu.o .obj/src/main/steam.o .obj/src/common/.cu-common.o .obj/src/common/dictator.o .obj/src/common/version.o .obj/src/logic/.cu-automaton.o .obj/src/logic/.cu-logic.o .obj/src/logic/bible.o .obj/libs/jsoncpp/jsoncpp.o .obj/src/ai/.cu-ai.o .obj/src/ai/aichargingcheetah.o .obj/src/network/.cu-network.o .obj/src/message/.cu-message.o .obj/src/user/.cu-client.o .obj/src/engine/.cu-diegetic.o .obj/src/engine/.cu-engine.o .obj/src/engine/commander.o .obj/src/engine/observer.o .obj/src/engine/ordercontext.o .obj/src/engine/selectorcontext.o .obj/src/graphics/.cu-graphics.o .obj/src/audio/.cu-audio.o .obj/src/action/.cu-action.o .obj/src/action/figure.o .obj/src/action/surface.o .obj/src/interface/.cu-interface.o .obj/libs/SDL2/SDL2_gfxPrimitives.o .obj/libs/SDL2/SDL2_rotozoom.o .obj/libs/imgui/imgui.o .obj/libs/imgui/imgui_demo.o .obj/libs/imgui/imgui_draw.o .obj/libs/imgui/imgui_impl_opengl2.o .obj/libs/imgui/imgui_impl_sdl.o .obj/libs/imgui/imgui_sdl.o .obj/libs/imgui/imgui_stdlib.o .obj/libs/imgui/imgui_widgets.o .obj/libs/tinygettext/dictionary.o .obj/libs/tinygettext/dictionary_manager.o .obj/libs/tinygettext/iconv.o .obj/libs/tinygettext/language.o .obj/libs/tinygettext/log.o .obj/libs/tinygettext/plural_forms.o .obj/libs/tinygettext/po_parser.o .obj/libs/tinygettext/tinygettext.o .obj/libs/tinygettext/unix_file_system.o -Wl,-rpath,'$ORIGIN' -lstdc++ -ldl -Wl,--no-as-needed bin/libfreetype.so bin/libpng16.so bin/libz.so -Wl,--as-needed bin/libSDL2_image.so bin/libSDL2_net.so bin/libSDL2_ttf.so bin/libSDL2.so bin/libGLEW.so -lGL bin/libssl.so bin/libcrypto.so bin/libcurl.so bin/libdiscord-rpc.so -lstdc++fs -O3 -lz -lm -pthread
clang++: error: no such file or directory: 'bin/libfreetype.so'
clang++: error: no such file or directory: 'bin/libpng16.so'
clang++: error: no such file or directory: 'bin/libz.so'
clang++: error: no such file or directory: 'bin/libSDL2_image.so'
clang++: error: no such file or directory: 'bin/libSDL2_net.so'
clang++: error: no such file or directory: 'bin/libSDL2_ttf.so'
clang++: error: no such file or directory: 'bin/libSDL2.so'
clang++: error: no such file or directory: 'bin/libGLEW.so'
clang++: error: no such file or directory: 'bin/libssl.so'
clang++: error: no such file or directory: 'bin/libcrypto.so'
clang++: error: no such file or directory: 'bin/libcurl.so'
clang++: error: no such file or directory: 'bin/libdiscord-rpc.so'
gmake: *** [Makefile:720 : bin/game] Erreur 1
That's odd. Before compiling anything it should have created the file bin/target (with contents in this case being "debian64") and then copied the bin/ folder from a subdirectory. Maybe this step failed earlier in the process.
Are those files (bin/libfreetype.so, bin/libpng16.so, etcetera) indeed missing from the bin/ folder? In that case you should be able to get those files with cp -RP archive/debian64/. ./
or by copying the contents of archive/debian64/bin/ into bin/ manually. Calling make debian64
will do the same thing but will also cause all object files to be recompiled.
If the files are present, it could be a permission problem if the initial make
that made bin/target was done as root.
Hello,
I'm trying to build the project on OpenBSD 6.8 amd64 but clang and gcc find errors at compilation time. I don't know why though. At least it doesn't seem linux-specific code to me (we often hit that when using BSD systems).
clang output:
clang 10.0.1 can't find _TRUNCATE and the function _vcsprintf I tried with gcc 8.4.0 which gives a similar output:
gcc output