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

Do not require libexecinfo in C++ docker images #2372

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ class CppStandaloneCmakeGenerator(private val targetConfig: TargetConfig, privat
|cmake_minimum_required(VERSION 3.5)
|project(${fileConfig.name} VERSION 0.0.0 LANGUAGES CXX)
|
|option(REACTOR_CPP_LINK_EXECINFO "Link against execinfo" OFF)
|
|${if (targetConfig.get(ExternalRuntimePathProperty.INSTANCE) != null) "find_package(reactor-cpp PATHS ${targetConfig.get(ExternalRuntimePathProperty.INSTANCE)})" else ""}
|
|set(LF_MAIN_TARGET ${fileConfig.name})
Expand All @@ -169,10 +167,6 @@ class CppStandaloneCmakeGenerator(private val targetConfig: TargetConfig, privat
|)
|target_link_libraries($S{LF_MAIN_TARGET} $reactorCppTarget)
|
|if(REACTOR_CPP_LINK_EXECINFO)
| target_link_libraries($S{LF_MAIN_TARGET} execinfo)
|endif()
|
|if(MSVC)
| target_compile_options($S{LF_MAIN_TARGET} PRIVATE /W4)
|else()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ class CppStandaloneGenerator(generator: CppGenerator) :
private fun getCmakeArgs(
buildPath: Path,
outPath: Path,
additionalCmakeArgs: List<String> = listOf(),
sourcesRoot: String? = null
) = cmakeArgs + additionalCmakeArgs + listOf(
) = cmakeArgs + listOf(
"-DCMAKE_INSTALL_PREFIX=${outPath.toUnixString()}",
"-DCMAKE_INSTALL_BINDIR=$relativeBinDir",
"-S",
Expand All @@ -191,12 +190,11 @@ class CppStandaloneGenerator(generator: CppGenerator) :
private fun createCmakeCommand(
buildPath: Path,
outPath: Path,
additionalCmakeArgs: List<String> = listOf(),
sourcesRoot: String? = null
): LFCommand {
val cmd = commandFactory.createCommand(
"cmake",
getCmakeArgs(buildPath, outPath, additionalCmakeArgs, sourcesRoot),
getCmakeArgs(buildPath, outPath, sourcesRoot),
buildPath.parent
)

Expand All @@ -219,9 +217,7 @@ class CppStandaloneGenerator(generator: CppGenerator) :

override fun generateRunForInstallingDeps(): String {
return if (builderBase() == defaultImage()) {
("RUN set -ex && apk add --no-cache g++ musl-dev cmake make && apk add --no-cache"
+ " --update --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/"
+ " libexecinfo-dev")
("RUN set -ex && apk add --no-cache g++ musl-dev cmake make")
} else {
"# (Skipping installation of build dependencies; custom base image.)"
}
Expand All @@ -246,7 +242,6 @@ class CppStandaloneGenerator(generator: CppGenerator) :
listOf("cmake") + getCmakeArgs(
Path.of("./build"),
Path.of("."),
listOf("-DREACTOR_CPP_LINK_EXECINFO=ON"),
"src-gen"
),
listOf("cmake") + getMakeArgs(fileConfig.buildPath, true, fileConfig.name),
Expand Down
Loading