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

undefine conflicting As macro #369

Merged
merged 1 commit into from
Jun 23, 2023
Merged

undefine conflicting As macro #369

merged 1 commit into from
Jun 23, 2023

Conversation

conradsnicta
Copy link
Contributor

@conradsnicta conradsnicta commented Jun 22, 2023

TLDR; Undefine conflicting 'As' macro which interferes with ensmallen. This stems from mlpack/mlpack#3501

Long story:
Class Library for Numbers (CLN; https://www.ginac.de/CLN/) is used by several other projects for scientific computing. With infinite wisdom, CLN defines a conflicting "As" macro. This prevents ensmallen (and hence mlpack) from being used in conjunction with CLN or any other project that uses CLN.

The proper fix would be to correct the CLN source. However, CLN has been around for a long while, and various old versions are vendored inside many projects and distributed in many linux distros. Undefining the silly "As" macro handles old versions of CLN.

Offending code is on lines 269 and 274 in https://www.ginac.de/CLN/cln.git/?p=cln.git;a=blob;f=include/cln/number.h;h=67f68899a6926eca49722f012d0a20d159162c57;hb=HEAD#l269

Copy link
Member

@rcurtin rcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed. I think one of the build jobs will fail unless you add something to HISTORY.md, but actually looking at the build jobs... I think the CI is not in a great state at the moment. Happy to merge anyway, I'm sure this won't break anything internally.

Copy link

@mlpack-bot mlpack-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second approval provided automatically after 24 hours. 👍

@conradsnicta conradsnicta merged commit 6266141 into master Jun 23, 2023
@conradsnicta conradsnicta deleted the patch-1 branch June 23, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants