Skip to content

more general build_lib script#1291

Closed
calad0i wants to merge 2 commits into
fastmachinelearning:mainfrom
calad0i:build_lib_update
Closed

more general build_lib script#1291
calad0i wants to merge 2 commits into
fastmachinelearning:mainfrom
calad0i:build_lib_update

Conversation

@calad0i

@calad0i calad0i commented May 5, 2025

Copy link
Copy Markdown
Contributor

Description

$OSTYPE is not a reliable source for determining the platform. On OpenSUSE 20250503, bash returns "linux" instead of "linux-gnu" and the script failed without -fPIC.

The updated script checks if -fno-gnu-unique is supported, and appends it if so.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Tests

Triggers on specific platforms.

@vloncar

vloncar commented May 9, 2025

Copy link
Copy Markdown
Contributor

Instead of replacing "$OSTYPE" == "linux-gnu" with "$OSTYPE" == "linux"* (a few characters change) the suggestion is to invoke the compiler to do nothing just to see if it will fail and if it doesn't then add a cflag... bit of an overkill, no? 😄

@jmitrevs

jmitrevs commented May 9, 2025

Copy link
Copy Markdown
Contributor

As an aside, should we move up from C++11? Vitis HLS I think uses C++14, Intel uses C++17. Probably makes little difference, though.

@vloncar

vloncar commented May 9, 2025

Copy link
Copy Markdown
Contributor

@jmitrevs Only if we split the build script over vivado/vitis (vivado compiler will say c++14 doesn't exist)

@calad0i

calad0i commented Jun 3, 2025

Copy link
Copy Markdown
Contributor Author

Using this way as $OSTYPE seems to unstable depending on the shell versison, and test if the compiler handles -fno-gnu-unique would always work as long as a compiler exists (and doesn't really take time).

@jmitrevs jmitrevs added the please test Trigger testing by creating local PR branch label Jun 11, 2025
@jmitrevs

Copy link
Copy Markdown
Contributor

In general I think this fix is good and would be in favor of merging it. I just put please test as a sanity check to make sure it doesn't break things.

@jmitrevs jmitrevs added please test Trigger testing by creating local PR branch and removed please test Trigger testing by creating local PR branch labels Jun 11, 2025
@jmitrevs

Copy link
Copy Markdown
Contributor

What did we decide on this? I think the pytest failures are unrelated.

@vloncar vloncar closed this Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please test Trigger testing by creating local PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants