Skip to content

Commit

Permalink
try to find out why building with static does not work on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mimran1980 committed Jan 14, 2025
1 parent a13292d commit 0a087de
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 12 deletions.
8 changes: 7 additions & 1 deletion rusteron-archive/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ impl LinkType {
fn link_lib(&self) -> &'static str {
match self {
LinkType::Dynamic => "dylib=",
LinkType::Static => "static=",
LinkType::Static => {
if cfg!(target_os = "linux") {
"" // TODO not sure why I need to do this static= should work on linux based on documentation
} else {
"static="
}
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion rusteron-client/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ impl LinkType {
fn link_lib(&self) -> &'static str {
match self {
LinkType::Dynamic => "dylib=",
LinkType::Static => "static=",
LinkType::Static => {
if cfg!(target_os = "linux") {
"" // TODO not sure why I need to do this static= should work on linux based on documentation
} else {
"static="
}
}
}
}

Expand Down
9 changes: 6 additions & 3 deletions rusteron-docker-samples/rusteron-dummy-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ edition = "2021"
websocket-lite = "0.5"
tokio = { version = "1", features = ["full"] }
futures-util = "0.3"
rusteron-archive = { version = "0.1.57"}
rusteron-media-driver = { version = "0.1.57"}
rusteron-archive = { version = "0.1.59", features = ["static"]}
rusteron-media-driver = { version = "0.1.59", features = ["static"]}
serde = { version = "1", features = ["derive"] }
serde_json = "1"
futures = "0.3"
log = "0.4"
env_logger = "0.11"
signal-hook = "0.3"
signal-hook = "0.3"

[features]
static = []
4 changes: 2 additions & 2 deletions rusteron-docker-samples/rusteron-dummy-example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ ARG BUILD_DIR_NAME=release

COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/ticker_reader /usr/local/bin/ticker_reader
COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/ticker_writer /usr/local/bin/ticker_writer
COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/build/rusteron-archive-*/out/build/lib/*.so /usr/lib
COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/build/rusteron-media-driver-*/out/build/lib/*.so /usr/lib
#COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/build/rusteron-archive-*/out/build/lib/*.so /usr/lib
#COPY --from=builder /usr/src/app/target/${BUILD_DIR_NAME}/build/rusteron-media-driver-*/out/build/lib/*.so /usr/lib

8 changes: 7 additions & 1 deletion rusteron-media-driver/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ impl LinkType {
fn link_lib(&self) -> &'static str {
match self {
LinkType::Dynamic => "dylib=",
LinkType::Static => "static=",
LinkType::Static => {
if cfg!(target_os = "linux") {
"" // TODO not sure why I need to do this static= should work on linux based on documentation
} else {
"static="
}
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion rusteron-rb/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ impl LinkType {
fn link_lib(&self) -> &'static str {
match self {
LinkType::Dynamic => "dylib=",
LinkType::Static => "static=",
LinkType::Static => {
if cfg!(target_os = "linux") {
"" // TODO not sure why I need to do this static= should work on linux based on documentation
} else {
"static="
}
}
}
}

Expand Down

0 comments on commit 0a087de

Please sign in to comment.