Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 13.2.0 build devel error #20586

Open
milerulk opened this issue Feb 2, 2024 · 2 comments
Open

GCC 13.2.0 build devel error #20586

milerulk opened this issue Feb 2, 2024 · 2 comments

Comments

@milerulk
Copy link

milerulk commented Feb 2, 2024

My Environment

  • ArangoDB Version: devel branch
  • Deployment Mode: any (this is a build question)
  • Deployment Strategy: any (this is a build question)
  • Configuration: any (this is a build question)
  • Infrastructure: own (VM)
  • Operating System: Ubuntu 23.10
  • Total RAM in your machine: 32Gb
  • Disks in use: SSD
  • Used Package: any

Component, Query & Data

Affected feature:

v8-build fails to compile

Steps to reproduce

  1. git clone latest version of devel branch
  2. mkdir build
  3. cd build
  4. cmake .. -DCMAKE_BUILD_TYPE=Debug -DUSE_JEMALLOC=Off -DUSE_MAINTAINER_MODE=off -DUSE_OPTIMIZE_FOR_ARCHITECTURE-On -DUSE_GOOGLE_TESTS=off
  5. The following error appears, failing to download v8-build:
Make Error at /usr/share/cmake-3.27/Modules/ExternalProject.cmake:3176 (message):
  No download info given for 'v8_build' and its source directory:

   /home/osboxes/arangodb/3rdParty/v8-build/v8

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /usr/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  3rdParty/v8-build/CMakeLists.txt:477 (ExternalProject_Add)
  1. I fix the error by git cloning the arangodb/v8 repo manually, then git reset --hard 980b6da
  2. make -j4

Used gcc version 13.2.0 (Ubuntu 13.2.0-4ubuntu3), as indicated in VERSIONS.

Also, I tried compiling the project, using the same steps, with the latest version of the docker image arangodb/ubuntubuildarangodb-devel:latest. The same error happens.

Problem:

In file included from ../../../../3rdParty/v8-build/v8/../v8/src/codegen/callable.h:8,
                 from ../../../../3rdParty/v8-build/v8/../v8/src/codegen/code-factory.h:8,
                 from ../../../../3rdParty/v8-build/v8/../v8/src/builtins/builtins-array.cc:8:
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h: At global scope:
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:650:18: error: expected identifier before ‘,’ token
  650 |     ##__VA_ARGS__,                                        \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:671:32: note: in expansion of macro ‘DEFINE_RESULT_AND_PARAMETERS’
  671 | #define DEFINE_PARAMETERS(...) DEFINE_RESULT_AND_PARAMETERS(1, ##__VA_ARGS__)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:756:3: note: in expansion of macro ‘DEFINE_PARAMETERS’
  756 |   DEFINE_PARAMETERS()
      |   ^~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:718:18: error: expected identifier before ‘,’ token
  718 |     ##__VA_ARGS__,                                          \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:815:3: note: in expansion of macro ‘DEFINE_JS_PARAMETERS’
  815 |   DEFINE_JS_PARAMETERS()
      |   ^~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:650:18: error: expected identifier before ‘,’ token
  650 |     ##__VA_ARGS__,                                        \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:671:32: note: in expansion of macro ‘DEFINE_RESULT_AND_PARAMETERS’
  671 | #define DEFINE_PARAMETERS(...) DEFINE_RESULT_AND_PARAMETERS(1, ##__VA_ARGS__)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:824:3: note: in expansion of macro ‘DEFINE_PARAMETERS’
  824 |   DEFINE_PARAMETERS()
      |   ^~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:650:18: error: expected identifier before ‘,’ token
  650 |     ##__VA_ARGS__,                                        \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:671:32: note: in expansion of macro ‘DEFINE_RESULT_AND_PARAMETERS’
  671 | #define DEFINE_PARAMETERS(...) DEFINE_RESULT_AND_PARAMETERS(1, ##__VA_ARGS__)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:674:3: note: in expansion of macro ‘DEFINE_PARAMETERS’
  674 |   DEFINE_PARAMETERS(__VA_ARGS__)          \
      |   ^~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:834:3: note: in expansion of macro ‘DEFINE_PARAMETERS_NO_CONTEXT’
  834 |   DEFINE_PARAMETERS_NO_CONTEXT()
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:718:18: error: expected identifier before ‘,’ token
  718 |     ##__VA_ARGS__,                                          \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:1693:3: note: in expansion of macro ‘DEFINE_JS_PARAMETERS’
 1693 |   DEFINE_JS_PARAMETERS()
      |   ^~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:650:18: error: expected identifier before ‘,’ token
  650 |     ##__VA_ARGS__,                                        \
      |                  ^
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:671:32: note: in expansion of macro ‘DEFINE_RESULT_AND_PARAMETERS’
  671 | #define DEFINE_PARAMETERS(...) DEFINE_RESULT_AND_PARAMETERS(1, ##__VA_ARGS__)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdParty/v8-build/v8/../v8/src/codegen/interface-descriptors.h:2144:3: note: in expansion of macro ‘DEFINE_PARAMETERS’
 2144 |   DEFINE_PARAMETERS()
      |   ^~~~~~~~~~~~~~~~~

Expected result:
v8-build compiles

@jsteemann
Copy link
Contributor

Regarding the missing v8 module:
Initially all git submodules may be missing after a fresh git checkout. Or some newly added git submodules may be adding after a git pull.
In this case it is best to just to git submodule update --init to fetch/update the missing submodules.

Regarding compilation with gcc:
we made the experience that compilation with g++ got increasingly more difficult with more recent versions of g++.
Starting with g++11.3 there were problems with compiling some legitimate code from some third party library we were using. These issues weren't resolved in g++12, but only in g++13.
However, g++12 and also g++13 introduced tons of false positives about uninitialized variables and out-of-bounds accesses, not just in our own code but also in many of the third party libraries (where they have been reported as well and have been identified as false posivies). That was really daunting and forced us to turn these checks off when compiling with g++ >= 13. To the best of my knowledge these issues still haven't been resolved in g++.
We recently also upgraded the bundled version of the V8 third party library, which also isn't able to compile with g++ anymore.

For all these reasons we moved the compilation to clang a while ago. clang-16 is known to compile devel fine. We are also using it in our CI and to reproduce build images.
So switching the tool chain (compiler & linker) to clang & lld would resolve the issue.

@jsteemann
Copy link
Contributor

Specifically, I am using all these cmake options to ensure that the entire toolchain uses clang tools and not the gcc ones:

-DCMAKE_C_COMPILER=clang-16 
-DCMAKE_CXX_COMPILER=clang++-16 
-DCMAKE_C_COMPILER_AR="/usr/bin/llvm-ar-16" 
-DCMAKE_CXX_COMPILER_AR="/usr/bin/llvm-ar-16" 
-DCMAKE_C_COMPILER_RANLIB="/usr/bin/llvm-ranlib-16" 
-DCMAKE_CXX_COMPILER_RANLIB="/usr/bin/llvm-ranlib-16" 
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld-16"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants