Open uh-zuh opened 2 years ago
fdb_c_options.g.h
is part of fdb_c
. This is fixed on master branch. To bypass this problem, you can build fdb_c
first, and then do the go install.
I have the same issue. I can't find the right instructions to build fdb_c
and get this fdb_c_options.g.h
file.
Can you point me into the right direction @jzhou77 please?
I tried the master branch and I have the same problem.
Does anyone succeed in bypassing this?
Where can I find fdb_c_options.g.h
?
🙏
edit: I found another way to get it. I installed the client package:
mkdir /etc/resource
wget https://www.foundationdb.org/downloads/6.3.18/ubuntu/installers/foundationdb-clients_6.3.18-1_amd64.deb -P /etc/resource/
sudo dpkg -i /etc/resource/foundationdb-clients_6.3.18-1_amd64.deb
ls /usr/include/foundationdb/
# fdb.options fdb_c.h fdb_c_options.g.h
I have same problem with fdb 7.1.36 on macOS 13.4.1 (a)
mkdir build
cd build
cmake ../
make -j4 fdb_c
...
[ 88%] Building CXX object fdbclient/CMakeFiles/fdbclient.dir/FDBOptions.g.cpp.o
[ 88%] Linking CXX static library ../lib/libfdbclient.a
[100%] Built target fdbclient
[100%] Building ASM object bindings/c/CMakeFiles/fdb_c.dir/fdb_c.g.S.o
[100%] Building CXX object bindings/c/CMakeFiles/fdb_c.dir/fdb_c.cpp.o
[100%] Linking CXX shared library ../../lib/libfdb_c.dylib
ld: warning: disabling chained fixups because of unaligned pointers
[100%] Built target fdb_c
Building generated files.
make -C /Users/aetcheverry/Projects/poc/build/foundationdb bindings/c/foundationdb/fdb_c_options.g.h
make: *** No rule to make target `bindings/c/foundationdb/fdb_c_options.g.h'. Stop.
Could not generate required c header
This is how fdb_c_options.g.h
is generated (copied from build.ninja
file).
# Custom command for fdbclient/include/fdbclient/fdb_c_options.g.h
build fdbclient/include/fdbclient/fdb_c_options.g.h | ${cmake_ninja_workdir}fdbclient/include/fdbclient/fdb_c_options.g.h: CUSTOM_COMMAND /root/src/foundationdb/fdbclient/vexillographer/fdb.options || vexillographer
COMMAND = cd /root/cbuild_output/fdbclient && /usr/bin/mono /root/cbuild_output/vexillographer.exe /root/src/foundationdb/fdbclient/vexillographer/fdb.options c /root/cbuild_output/fdbclient/include/fdbclient/fdb_c_options.g.h
DESC = Generate FDBOptions c files
restat = 1
# Custom command for fdbclient/include/fdbclient/FDBOptions.g.h
build fdbclient/include/fdbclient/FDBOptions.g.h | ${cmake_ninja_workdir}fdbclient/include/fdbclient/FDBOptions.g.h: CUSTOM_COMMAND fdbclient/FDBOptions.g.h || fdbclient/fdboptions_c vexillographer
COMMAND = cd /root/cbuild_output/fdbclient && /usr/local/bin/cmake -E copy /root/cbuild_output/fdbclient/FDBOptions.g.h /root/cbuild_output/fdbclient/include/fdbclient/FDBOptions.g.h
DESC = Generating include/fdbclient/FDBOptions.g.h
restat = 1
We usually compile insider build docker image with command like CC=clang CXX=clang++ LD=lld cmake -S ${HOME}/src/foundationdb -B ${HOME}/cbuild_output -D USE_LD=LLD -D USE_WERROR=ON -D USE_LIBCXX=1 -G Ninja && ninja -C ${HOME}/cbuild_output
vexillographer.exe
is compiled from C# code:
# Custom command for vexillographer.exe
build vexillographer.exe | ${cmake_ninja_workdir}vexillographer.exe: CUSTOM_COMMAND /root/src/foundationdb/fdbclient/vexillographer/c.cs /root/src/foundationdb/fdbclient/vexillographer/cpp.cs /root/src/foundationdb/fdbclient/vexillographer/java.cs /root/src/foundationdb/fdbclient/vexillographer/python.cs /root/src/foundationdb/fdbclient/vexillographer/ruby.cs /root/src/foundationdb/fdbclient/vexillographer/vexillographer.cs
COMMAND = cd /root/cbuild_output && /usr/bin/mcs -r:System,System.Core,System.Data,System.Xml,System.Xml.Linq /root/src/foundationdb/fdbclient/vexillographer/c.cs /root/src/foundationdb/fdbclient/vexillographer/cpp.cs /root/src/foundationdb/fdbclient/vexillographer/java.cs /root/src/foundationdb/fdbclient/vexillographer/python.cs /root/src/foundationdb/fdbclient/vexillographer/ruby.cs /root/src/foundationdb/fdbclient/vexillographer/vexillographer.cs -target:exe -out:/root/cbuild_output/vexillographer.exe
DESC = Compile Vexillographer
restat = 1
Thanks @jzhou77, but it doesn't work, I'm on a Mac Studio M2, the docker image is only for amd64 :(
Error response from daemon: manifest for foundationdb/build:latest not found: manifest unknown: manifest unknown
Unable to find image 'foundationdb/build:latest' locally
docker: Error response from daemon: manifest for foundationdb/build:latest not found: manifest unknown: manifest unknown.
How do you go about developing layers in Go on macOS?
I find it really difficult to use the go client.
I trying to generate ninja file:
mkdir build
cd build
cmake ../ -D USE_LD=LLD -D USE_WERROR=ON -D USE_LIBCXX=1 -G Ninja
ninja
...
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- failed to compile
CMake Error at build/flowbench/googlebenchmark-src/CMakeLists.txt:283 (message):
Failed to determine the source files for the regular expression backend
-- Configuring incomplete, errors occurred!
ninja: error: loading 'build.ninja': No such file or directory
Building generated files.
make -C /Users/euskadi31/Projects/poc/build/foundationdb bindings/c/foundationdb/fdb_c_options.g.h
make: *** No rule to make target `bindings/c/foundationdb/fdb_c_options.g.h'. Stop.
Could not generate required c header
As mentioned there: https://github.com/apple/foundationdb/tree/master/bindings/go I run only one command and get error:
I try it in Ubuntu 18.04 LTS on Windows.