Skip to content

Conversation

@LuAbelt
Copy link

@LuAbelt LuAbelt commented Mar 11, 2025

Currently benchbuild uses a comma (,) to join multiple variants into a string. This can cause issues during compilation of some C/CPP projects when they set linker options.

The specific issue arises when using -Wl,rpath,<Path> to pass an rpath to the linker. As benchbuild automatically creates a new build folder for the project for compilation, the Path can contain commas if the project uses variants.

However, -Wl treats every comma as a separator for inputs to pass on to the linker. The result is a compilation error.

I think it would be a reasonable change to switch to a different separator. For now, I use the asterisk in my setup but maybe another separator is better suited (asterisks in names causes some weird behavior with with auto-completion in the command line)

@LuAbelt LuAbelt marked this pull request as ready for review November 21, 2025 08:57
@simbuerg
Copy link
Member

Sorry for the huge delay. I had a look at it at the beginning of the year and was occupied with life for a while until I forgot :-).

I see your problem with gcc linker flags being a problem. However, that sounds to me that BB should probably just make sure that we generate an 'escaped' builddir, instead of changing the separator.

Can you check, if #575 works for you?

I did not put much testing into it. Some quick checks with common characters will break the yaml loader: '*'. But you can, in principle, use arbitrary separator strings to make the revision string fit your needs.

@LuAbelt
Copy link
Author

LuAbelt commented Nov 26, 2025

Thanks for the effort. I tested out #575 and it works just fine (on first glance I also just did a quick test on it).

Also it's an overall better solution than this quick fix, which also allows to adjust it if (for whatever reasons) other build system have specific issues with other separators.

@LuAbelt LuAbelt closed this Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants