From 87abc58005c60047df9759417ecd5b00d8993e36 Mon Sep 17 00:00:00 2001 From: Nic30 Date: Thu, 6 Jun 2024 21:40:21 +0200 Subject: [PATCH] fix(meson): rm use of locally installed antrl4 * because meson check for version does not work --- Dockerfile | 3 +-- README.md | 6 +++--- meson.build | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70ce92e0..033855d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,7 @@ RUN adduser --disabled-password \ ${NB_USER} RUN apt install build-essential uuid-dev cmake default-jre\ - python3 python3-dev python3-pip libantlr4-runtime-dev\ - antlr4 libssl-dev -yq + python3 python3-dev python3-pip libssl-dev -yq RUN pip3 install scikit-build Cython notebook --break-system-packages # RUN pip3 install hdlConvertor diff --git a/README.md b/README.md index e5817a60..db8c52b4 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ It contains: ## Installation Linux: -Installing dependencies (Ubuntu 20.10) +Installing dependencies (Ubuntu 24.04) ``` -# gcc>=9, Visual Studio 2017 or equivalent recommended -sudo apt install build-essential uuid-dev cmake default-jre python3 python3-dev python3-pip libantlr4-runtime-dev antlr4 ninja-build +# gcc>=13, Visual Studio 2017 or equivalent recommended +sudo apt install build-essential uuid-dev cmake default-jre python3 python3-dev python3-pip ninja-build ``` Installing this library diff --git a/meson.build b/meson.build index 7656d1d3..ae9ea652 100644 --- a/meson.build +++ b/meson.build @@ -30,8 +30,9 @@ elif host_machine.system() == 'linux' EXTRA_CXX_FLAGS += ['-Wall', '-pedantic', '-W', '-Wno-attributes'] endif -antlr4_cpp_dep = cc.find_library('antlr4-runtime', required : false) -if not antlr4_cpp_dep.found() +# [fixme] use of local antlr4-runtime dissabled because check for version does not work +#antlr4_cpp_dep = cc.find_library('antlr4-runtime', required : false) +#if not antlr4_cpp_dep.found() message('atempting to download antrl4-complete.jar and antlr4-runtime for C++ because installation was not found') cmake = import('cmake') @@ -40,7 +41,7 @@ if not antlr4_cpp_dep.found() 'ANTLR_BUILD_CPP_TESTS': false, 'ANTLR_BUILD_SHARED': false, 'ANTLR4_INSTALL': false, - 'CMAKE_CXX_FLAGS': ' '.join(EXTRA_CXX_FLAGS + ['-Wno-overloaded-virtual']), + 'CMAKE_CXX_FLAGS': ' '.join(EXTRA_CXX_FLAGS + ['-Wno-overloaded-virtual', '-Wno-unused-parameter']), 'CMAKE_POSITION_INDEPENDENT_CODE': true, 'CMAKE_BUILD_TYPE': 'Release', }) @@ -55,13 +56,13 @@ if not antlr4_cpp_dep.found() f'https://www.antlr.org/download/antlr-@antlr4_cpp_version@-complete.jar', antlr4_jar, '--hash', 'md5', 'c9c8b566a7fcf8ef80e229f14b154a26', check: true) antlr4_java = find_program('utils/antlr4-complete.sh') # an extra script so we do not need to write all arguments everytime -else - antlr4_cpp_inc = include_directories('/usr/include/antlr4-runtime/') - antlr4_cpp_dep = cc.find_library('antlr4-runtime', header_include_directories: antlr4_cpp_inc, has_headers: 'antlr4-runtime.h', required : false) - # redeclare because include_dir somehow is not in dependency - antlr4_cpp_dep = declare_dependency(dependencies: [antlr4_cpp_dep], include_directories: antlr4_cpp_inc) - antlr4_java = find_program('antlr4', required : true) -endif +#else +# antlr4_cpp_inc = include_directories('/usr/include/antlr4-runtime/') +# antlr4_cpp_dep = cc.find_library('antlr4-runtime', header_include_directories: antlr4_cpp_inc, has_headers: 'antlr4-runtime.h', required : false) +# # redeclare because include_dir somehow is not in dependency +# antlr4_cpp_dep = declare_dependency(dependencies: [antlr4_cpp_dep], include_directories: antlr4_cpp_inc) +# antlr4_java = find_program('antlr4', required : true) +#endif cp = find_program('cp', required : true)