Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
821f96c
[REX]:deBoost: replace boost::replace_all_copy with Rose::StringUtili…
yanyh15 Sep 2, 2023
f134187
Replaced boost::filesystem with std::filesystem
pflynn157 Sep 6, 2023
403c8d2
Removed Boost Wave/Filesystem dependencies (dependency removal; not a…
pflynn157 Sep 13, 2023
040d5cc
Removed Boost thread dependency
pflynn157 Sep 13, 2023
a104e37
Removed Boost regex/random dependencies
pflynn157 Sep 13, 2023
29dd1f1
Removed boost system/serialization dependencies
pflynn157 Sep 13, 2023
48a7c9b
Removed boost iostreams/program options dependencies
pflynn157 Sep 13, 2023
5ceb91a
Initial boost removal (note: things still commented out)
pflynn157 Sep 13, 2023
e27f2f5
Removed Boost fields from CMake
pflynn157 Sep 13, 2023
c2c3d20
Partially removed Boost from Node.code
pflynn157 Sep 13, 2023
7ee1563
Removed more boost code; removed dead extractFunctionArgumentsNormali…
pflynn157 Sep 13, 2023
f9e8ad7
Removed potentially dead midend code
pflynn157 Sep 13, 2023
2d3bf16
Revert "Removed potentially dead midend code"
pflynn157 Sep 26, 2023
737a8d9
Revert "Removed more boost code; removed dead extractFunctionArgument…
pflynn157 Sep 26, 2023
2dbc1bd
Removed boost serialization
pflynn157 Sep 26, 2023
0c95ac3
[REX]: deBoost: replace the usage of BOOST_FOREACH with C++17 foreach.
yanyh15 Sep 29, 2023
d200a8d
[REX]: deBoost: removing boost from autotools building,
yanyh15 Sep 29, 2023
583e955
deBoost: removing boost usage in src/util/StringUtility
yanyh15 Nov 13, 2024
86e5bd0
deBoost: now boost usage are all removed from src/util
yanyh15 Nov 13, 2024
b40daa8
deBoost: remove boost usage in src/3rdPartyLibraries, mainly remove s…
yanyh15 Nov 13, 2024
2b80afd
deBoost: remove several boost usage in non-src folder
yanyh15 Nov 13, 2024
6e526c5
deBoost: remove boost usage in src/frontend/SageIII, WIP. done with s…
yanyh15 Nov 13, 2024
bc19089
deBoost: remove all usage in src/backend
yanyh15 Nov 13, 2024
9a5e78b
deBoost: remove boost usage in src/midend/astDiagnostics and astQuery
yanyh15 Nov 13, 2024
871834c
deBoost: remove boost usage in src/midend/programTransformation
yanyh15 Nov 13, 2024
a880ef1
deBoost: remove boost usage in midend/programAnalysis
yanyh15 Nov 13, 2024
62a7c4b
deBoost: remove the use of ROSE_USING_GRAPH_IR_NODES_FOR_BACKWARD_COM…
yanyh15 Nov 15, 2024
b00e4cc
deBoost: remove boost related test and fix wave-related linking error…
yanyh15 Nov 15, 2024
99e6762
deBoost: remove boost-based useless graph processing headers
yanyh15 Nov 15, 2024
c0b190f
remove src/frontend/Experimental_General_Language_Support and src/fro…
yanyh15 Nov 15, 2024
07eaad0
cleaning up doxygen-based doc systems, still not yet finish
yanyh15 Nov 16, 2024
a814b10
deBoost: minor change of two files
yanyh15 Nov 28, 2024
5202fb8
Use http protocol for git modules
ouankou May 24, 2025
0f9c785
Update github CI to test on Ubuntu 24.04
ouankou May 24, 2025
c8201c7
Enable C++17 for compilation
ouankou May 24, 2025
7236fb0
Fix git submodule in CI
ouankou May 24, 2025
641ceff
Use java 11 in CI
ouankou May 24, 2025
402470b
Fix java lib path in CI
ouankou May 24, 2025
2bf5408
Fix java CLASSPATH setting
ouankou May 24, 2025
04415b8
Update java setting in CI and enable more tests
ouankou May 24, 2025
239dfda
Fix compiler setting in CI
ouankou May 25, 2025
2b08899
Use OpenJDK 17 in CI
ouankou May 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions .github/workflows/auto_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,26 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
os: [ubuntu-24.04]
gnu: [9]

runs-on: ${{ matrix.os }}
env:
CC: /usr/bin/gcc-${{ matrix.gnu }}
CXX: /usr/bin/g++-${{ matrix.gnu }}
LD_LIBRARY_PATH: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server:/usr/lib/x86_64-linux-gnu
LD_LIBRARY_PATH: /usr/lib/jvm/java-17-openjdk-amd64/lib/server

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
with:
distribution: 'temurin'
java-version: '8'
submodules: 'recursive'
token: ${{ secrets.SUBMODULE_TOKEN }}

- name: Checkout submodules
shell: bash
run: |
git submodule sync --recursive
git -c "http.extraheader=Authorization: basic ${{ secrets.SUBMODULE_TOKEN }}" -c protocol.version=2 submodule update --init --force --recursive --depth=1
git submodule status
# NOTE: Ubuntu 24.04 ships antlr4 v4.9 but antlr4-cpp-runtime v4.10, which are API-incompatible; manually install the matching antlr4 v4.10.
- uses: StoneMoe/setup-antlr4@v4.10.1

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y openjdk-8-jdk && \
sudo apt-get install -y \
antlr4 \
automake \
autotools-dev \
bison \
Expand All @@ -59,6 +50,7 @@ jobs:
libantlr4-runtime-dev \
libboost-all-dev \
libtool \
openjdk-17-jdk \
python3-dev

- name: Configure
Expand All @@ -67,7 +59,8 @@ jobs:
./build
mkdir ../rex_build
cd ../rex_build
$GITHUB_WORKSPACE/configure --prefix=$GITHUB_WORKSPACE/../rex_install --with-boost=/usr --with-boost-libdir=/usr/lib/x86_64-linux-gnu --enable-languages=c,c++,fortran --disable-tests-directory --disable-tutorial-directory
CC=gcc-${{ matrix.gnu }} CXX=g++-${{ matrix.gnu }} FC=gfortran-${{ matrix.gnu }} \
$GITHUB_WORKSPACE/configure --prefix=$GITHUB_WORKSPACE/../rex_install --with-boost=/usr --with-boost-libdir=/usr/lib/x86_64-linux-gnu --enable-languages=c,c++,fortran

- name: Build
run: |
Expand All @@ -78,8 +71,4 @@ jobs:
- name: Test
run: |
cd $GITHUB_WORKSPACE/../rex_build
make check-core -j2
cd $GITHUB_WORKSPACE/../rex_build/tests/nonsmoke/functional/CompileTests/OpenMP_tests
make check -j2
cd $GITHUB_WORKSPACE/../rex_build/tests/nonsmoke/functional/roseTests/astInterfaceTests
make check -j2
make check-rex -j2
27 changes: 10 additions & 17 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,26 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
os: [ubuntu-24.04]
gnu: [9]

runs-on: ${{ matrix.os }}
env:
CC: /usr/bin/gcc-${{ matrix.gnu }}
CXX: /usr/bin/g++-${{ matrix.gnu }}
LD_LIBRARY_PATH: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server:/usr/lib/x86_64-linux-gnu
LD_LIBRARY_PATH: /usr/lib/jvm/java-17-openjdk-amd64/lib/server

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
with:
distribution: 'temurin'
java-version: '8'
submodules: 'recursive'
token: ${{ secrets.SUBMODULE_TOKEN }}

- name: Checkout submodules
shell: bash
run: |
git submodule sync --recursive
git -c "http.extraheader=Authorization: basic ${{ secrets.SUBMODULE_TOKEN }}" -c protocol.version=2 submodule update --init --force --recursive --depth=1
git submodule status
# NOTE: Ubuntu 24.04 ships antlr4 v4.9 but antlr4-cpp-runtime v4.10, which are API-incompatible; manually install the matching antlr4 v4.10.
- uses: StoneMoe/setup-antlr4@v4.10.1

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y openjdk-8-jdk && \
sudo apt-get install -y \
antlr4 \
automake \
autotools-dev \
bison \
Expand All @@ -59,14 +50,16 @@ jobs:
libantlr4-runtime-dev \
libboost-all-dev \
libtool \
openjdk-17-jdk \
python3-dev

- name: Configure
run: |
cd $GITHUB_WORKSPACE
mkdir ../rex_build
cd ../rex_build
cmake -Denable-c=ON -Denable-fortran=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../rex_install $GITHUB_WORKSPACE
CC=gcc-${{ matrix.gnu }} CXX=g++-${{ matrix.gnu }} FC=gfortran-${{ matrix.gnu }} \
cmake -Denable-c=ON -Denable-fortran=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/../rex_install -Ddisable-tests-directory=ON $GITHUB_WORKSPACE

- name: Build
run: |
Expand Down
92 changes: 6 additions & 86 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# 8. If a CMakefile file needs to be conditionally enabled, do it in that CMake file rather than around the
# add_subdirectory in the level above. This keeps all the logic for a directory in a single file rather than
# split across two files. It is a bit unfortunate that CMake can't find the lower-level CMakeList files

# on its own, so some of the logic is still necessarily in the level above. There are exceptions to this rule,
# and they're pretty obvious when they occur--as when a single if() protects a whole bunch of add_subdirectory.

Expand Down Expand Up @@ -96,7 +97,7 @@ else()
set(CMAKE_VERBOSE_MAKEFILE FALSE)
endif()

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(BUILD_SHARED_LIBS "Build all libraries shared" FALSE)
Expand All @@ -112,8 +113,6 @@ if(WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()

add_definitions(-DBOOST_ALL_NO_LIB=1)

# FIXME: Why do we have to have a copy of some standard built-in modules inside rose?
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})

Expand Down Expand Up @@ -148,93 +147,14 @@ file(READ ${ROSE_SCM_DATE_FILE} ROSE_VERSION)
message(STATUS "The ROSE version integer is ${ROSE_VERSION}")
message(STATUS "The ROSE version string is ${ROSE_PACKAGE_VERSION}")

########################################################################################################################
# Boost libraries
########################################################################################################################

message(STATUS
"If you get a whole bunch of warnings saying 'New Boost version may have incorrect or missing dependencies and "
"imported targets' it is probably because you're using a Boost version that was released after your CMake version. "
"See [https://github.com/Kitware/CMake/commits/master/Modules/FindBoost.cmake] to see latest supported version and "
"[https://github.com/Microsoft/vcpkg/issues/2459] for a description of the problem. Note that CMake versions "
"3.11.0 through 3.13.2 and possibly later) cannot be compiled (syntax errors) with a GNU C++ compiler that's "
"configured to use a non-default language standard (e.g., C++11 with GCC-5.4 whose default is GNU++03).")

set(Boost_USE_STATIC_LIBS FALSE)
set(Boost_DEBUG ${VERBOSE})

# Honor BOOST_HOME environment variable
if(DEFINED ENV{BOOST_HOME})
set(BOOST_ROOT "$ENV{BOOST_HOME}")
endif()

option(Boost_USE_MULTITHREADED "Should Boost multithreaded libraries be used?" OFF)

if(WIN32)
find_package(Boost REQUIRED)
set(BOOST_LIBRARYDIR ${Boost_LIBRARY_DIRS})
set(BOOST_INCLUDEDIR ${Boost_INCLUDE_DIRS}/)

message("Boost information:")
message(" BOOST_ROOT: ${BOOST_ROOT}")
message(" Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(" Boost_LIBRARIES: ${Boost_LIBRARIES}")
message(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
message(" BOOST_LIBRARYDIR : ${BOOST_LIBRARYDIR}")
message(" BOOST_INCLUDEDIR : ${BOOST_INCLUDEDIR}")

include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
endif(WIN32)

# FIXME: 1.47 is no longer supported by ROSE, but is what's installed on Jenkins' CMake test machine. This should
# be changed to the actual minimum supported version once Pei-Hung upgrades the machine. [Matzke 2019-01-21]
#
# First look for the Boost libraries that are required in order to compile ROSE, then additionally look for any optional
# libraries that are useful to ROSE but not required. From a user: "The find_package() change is required for boost
# 1.70 or above on any system when using a recent enough version of cmake. Without it, serialization support will not
# be used. Before boost 1.70, the findBoost() in cmake is used directly, and it will look for boost components that are
# not in the find_package clause. Since 1.70, cmake will load the findBoost() provided by the boost package itself.
# Unfortunately, that findBoost() will only check for components in the find_package() clause. This means that
# serialization is considered not to exist, even if it is there. My change calls find_package again without the
# REQUIRED clause after the first one has succeeded. That way the first clause checks for requires components, and the
# second can check again including optional components. If the version of cmake is high enough you can use an
# OPTIONAL_COMPONENTS clause instead, but that wasn't introduced until 3.11."
find_package(Boost 1.47.0
COMPONENTS chrono date_time filesystem iostreams program_options random regex system wave thread
REQUIRED)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Could not find Boost version 1.35.0 or newer command")
endif()
find_package(Boost 1.47.0
COMPONENTS chrono date_time filesystem iostreams program_options random regex system wave thread serialization)
include_directories(${Boost_INCLUDE_DIRS})

# Paths to install header, executable, and libraries
set(INCLUDE_INSTALL_DIR "include/rose")
set(BIN_INSTALL_DIR "bin")
set(LIB_INSTALL_DIR "${ROSE_LIB_DIR_NAME}")

set(INSTALL_TARGETS_DEFAULT_ARGS
RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
COMPONENT Devel)

# A new definition to tweak code for cmake
set(USE_CMAKE 1)

# ROSE configuration variables for Boost
set(HAVE_BOOST ${Boost_FOUND})
set(HAVE_BOOST_SERIALIZATION_LIB ${Boost_SERIALIZATION_FOUND})
set(HAVE_BOOST_DATE_TIME ${Boost_DATE_TIME_FOUND})
set(HAVE_BOOST_FILESYSTEM ${Boost_FILESYSTEM_FOUND})
set(HAVE_BOOST_PROGRAM_OPTIONS ${Boost_PROGRAM_OPTIONS_FOUND})
set(HAVE_BOOST_REGEX ${Boost_REGEX_FOUND})
set(HAVE_BOOST_SYSTEM ${Boost_SYSTEM_FOUND})
set(HAVE_BOOST_THREAD ${Boost_THREAD_FOUND})
set(HAVE_BOOST_WAVE ${Boost_WAVE_FOUND})
set(USE_ROSE_BOOST_WAVE_SUPPORT ${Boost_WAVE_FOUND})

########################################################################################################################
# ROSETTA
Expand Down Expand Up @@ -512,7 +432,7 @@ if(enable-microsoft-extensions)
endif()

if(enable-fortran)
set(enable-ofp-version "20200819-JDK8" CACHE STRING "version number for OFP")
set(enable-ofp-version "20200704" CACHE STRING "version number for OFP")
set($ENV{CLASSPATH} ${CMAKE_SOURCE_DIR}/src/3rdPartyLibraries/antlr-jars/antlr-3.5.2-complete.jar::${CMAKE_SOURCE_DIR}/rc/3rdPartyLibraries/fortran-parser/OpenFortranParser-${enable-ofp-version}.jar)
endif()

Expand Down Expand Up @@ -621,12 +541,12 @@ endif()
# define a global variable to collect all common linked third-party libraries for rose
if(NOT WIN32)
if(NOT APPLE)
set(link_with_libraries ${Boost_LIBRARIES} ${M_LIB} ${RT_LIB} ${CMAKE_THREAD_LIBS_INIT})
set(link_with_libraries ${M_LIB} ${RT_LIB} ${CMAKE_THREAD_LIBS_INIT})
else()
set(link_with_libraries ${Boost_LIBRARIES} ${M_LIB} ${CMAKE_THREAD_LIBS_INIT})
set(link_with_libraries ${M_LIB} ${CMAKE_THREAD_LIBS_INIT})
endif()
else()
set(link_with_libraries ${Boost_LIBRARIES} shlwapi.lib psapi.lib)
set(link_with_libraries shlwapi.lib psapi.lib)
endif()

# Check compilers and version numbers. The module is located in src/cmake/modules.
Expand Down
7 changes: 1 addition & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,7 @@ endif
@echo '***** make install-data rule complete (terminated normally) *****'
@echo '*****************************************************************'

# DQ (4/22/2005): Set this so that make distcheck will use the same
# --with-edg_source_code=true/false option as were used at configure.
# JJW (5/14/2008): Add the Boost flag the same way, using an internal
# variable from AX_BOOST_* to find the argument to --with-boost when
# this copy of ROSE was originally configured.
DISTCHECK_CONFIGURE_FLAGS = --with-boost=$(ac_boost_path)
DISTCHECK_CONFIGURE_FLAGS =

# DQ (7/25/2008): If ROSE was originallly configured with Fortran (by tuning
# on the java support) then make sure it is tested as part of the distcheck rule.
Expand Down
32 changes: 5 additions & 27 deletions config/Makefile.for.ROSE.includes.and.libs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ if USE_ROSE_IN_BUILD_TREE_VAR
export ROSE_IN_BUILD_TREE=$(top_builddir)
endif

# DQ (12/22/2008): Specification of Boost path for use with "-isystem" option (may be GNU
# specific). We use this option only if the configuration of ROSE has detected a
# previously installed version of Boost (which we do not want to use).
# Note that only one of these will be non-empty makefile variables.
ROSE_BOOST_PREINCLUDE_PATH = @ROSE_BOOST_PREINCLUDE_PATH@
ROSE_BOOST_NORMAL_INCLUDE_PATH = @ROSE_BOOST_NORMAL_INCLUDE_PATH@
# Force C++17 (-std=c++17) to enable modern language features across all compilers.
AM_CXXFLAGS = -std=c++17

# This is properly handled by automake even when specified in an include file
EDG_LIBS = @EDG_LIBS@
Expand Down Expand Up @@ -129,8 +125,7 @@ ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH_ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
-I$(top_srcdir)/src/midend/programAnalysis \
-I$(top_srcdir)/src/3rdPartyLibraries/json \
-I$(top_srcdir)/src/util/graphs \
$(ROSE_FLANG_INCLUDES) \
$(ROSE_BOOST_NORMAL_INCLUDE_PATH)
$(ROSE_FLANG_INCLUDES)
# else # ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
# ROSE_INCLUDES =
# $(ROSE_BOOST_PREINCLUDE_PATH)
Expand Down Expand Up @@ -209,9 +204,7 @@ ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH = \
-I$(top_srcdir)/src/midend/astUtil/astInterface \
-I$(top_srcdir)/libltdl \
$(VALGRIND_CFLAGS) \
$(ROSE_BOOST_NORMAL_INCLUDE_PATH) \
$(ROSE_PCH_INCLUDE) \
$(BOOST_CPPFLAGS)
$(ROSE_PCH_INCLUDE)
# endif # ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT

# DQ (10/23/2015): These paths have been replaces with the following variables.
Expand All @@ -223,12 +216,7 @@ ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH = \
# $(ROSE_CLANG_INCLUDE)

SWIG_ROSE_INCLUDES = $(ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH)
ROSE_INCLUDES = -I$(top_builddir) -I$(top_builddir)/src $(ROSE_BOOST_PREINCLUDE_PATH) $(ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH)

# DQ (12/22/2008): Move Boost directory to front and used "-isystem" option so
# that a system with a previous (older) installation of boost does not interfer
# with the use of ROSE (and the version of boost specified using "--with-boost").
# $(BOOST_CPPFLAGS)
ROSE_INCLUDES = -I$(top_builddir) -I$(top_builddir)/src $(ROSE_INCLUDES_WITHOUT_BOOST_ISYSTEM_PATH)

# DQ (10/28/2008): I think these should be included, I don't know why they
# were removed (used with Microsoft Windows tests, and Yices tests).
Expand All @@ -244,17 +232,7 @@ ROSE_INCLUDES = -I$(top_builddir) -I$(top_builddir)/src $(ROSE_BOOST_PREINCLUDE_
# JJW 7/25/2008: This should probably just be the same as ROSE_LIBS
ROSE_LIBS_WITH_PATH = $(ROSE_LIBS)

# ROSE_LIBS = $(top_builddir)/src/librose.la -lm $(LEXLIB) $(WAVE_LDFLAGS) $(WAVE_LIBRARIES) $(WAVE_LIBS) $(JAVA_JVM_LIB) $(RT_LIBS)

# MS 10/19/2015: added ROSE_BOOST_LIBS variable to share exact same
# boost libs list in ROSE an in the ROSTTA Makefiles.
ROSE_BOOST_LIBS=$(BOOST_LDFLAGS) $(BOOST_DATE_TIME_LIB) $(BOOST_CHRONO_LIB) \
$(BOOST_THREAD_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) \
$(BOOST_RANDOM_LIB) $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_SERIALIZATION_LIB) \
$(BOOST_WAVE_LIB) $(BOOST_IOSTREAMS_LIB) $(BOOST_ATOMIC_LIB)

ROSE_LIBS = $(abspath $(top_builddir)/src/librose.la) -lm $(JAVA_JVM_LINK) \
$(ROSE_BOOST_LIBS) \
$(RT_LIBS) \
$(ROSE_INTEL_COMPILER_MATH_LIBS) \
$(ROSE_QUAD_FLOAT_MATH)
Expand Down
Loading