Build issue with GCC on FreeBSD
To build with GCC on FreeBSD, change your `build_freebsd_x86_64` on `ecode-nightly.yml`:
- To also install the package `gcc`
- `CC=/usr/local/bin/gcc` and `CXX=/usr/local/bin/g++`
The GCC package on FreeBSD is currently GCC 13.5
The error message I'm currently see:
```
In file included from ../../src/tools/ecode/ecode.hpp:10,
from ../../src/tools/ecode/appconfig.cpp:2:
../../src/tools/ecode/plugins/plugincontextprovider.hpp:55:7: error: redefinition of 'class ecode::PluginContextProvider'
55 | class PluginContextProvider {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/tools/ecode/plugins/pluginmanager.hpp:6,
from ../../src/tools/ecode/projectdirectorytree.hpp:5,
from ../../src/tools/ecode/filesystemlistener.hpp:4,
from ../../src/tools/ecode/ecode.hpp:7:
../../src/tools/ecode/plugins/plugincontextprovider.hpp:55:7: note: previous definition of 'class ecode::PluginContextProvider'
55 | class PluginContextProvider {
| ^~~~~~~~~~~~~~~~~~~~~
bus.cpp
busprocess.cpp
gmake[1]: *** [ecode.make:316: ../../obj/bsd/x86_64/release/ecode/appconfig.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:636: ecode] Error 2
```
It's weird that this doesn't happen with GCC on other platforms. The GCC you are using on Linux seems to be also GCC 13.
`plugincontextprovider.hpp` has `#pragma once`, so everything should be fine. I have no idea why this is happening.
关闭于 2025-12-06 1 条评论