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

NEURON 8.2.x fails to build on MacOS 14 #3021

Open
JCGoran opened this issue Jul 30, 2024 · 3 comments
Open

NEURON 8.2.x fails to build on MacOS 14 #3021

JCGoran opened this issue Jul 30, 2024 · 3 comments
Labels
bug building Issue related to build/compilation macOS Issues that have a macOS-specific dimension.

Comments

@JCGoran
Copy link
Contributor

JCGoran commented Jul 30, 2024

Context

NEURON branch release/8.2 fails to build from source on MacOS 14 with AppleClang 15.0.0.15000309. Tested on Python 3.9, but others may be affected as well.

Overview of the issue

The error that occurs when running build_wheels.bash osx 3.9 coreneuron is:

In file included from nrn/src/nrniv/pysecname2sec.cpp:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:2777:33: error: no member named 'hoc_begin' in 'std::initializer_list<bool>'
        __construct_at_end(__il.begin(), __il.end(), __n);
                           ~~~~ ^
nrn/src/oc/redef.h:32:28: note: expanded from macro 'begin'
#define begin              hoc_begin
                           ^
5 errors generated.
make[2]: *** [src/nrniv/CMakeFiles/nrniv_lib.dir/pysecname2sec.cpp.o] Error 1

It seems macro expansion is the culprit:

#define begin hoc_begin

This was addressed on master in #1969, but the diff does not apply cleanly, and I'm not sure if it's compatible with 8.2.x.

@JCGoran JCGoran added bug building Issue related to build/compilation macOS Issues that have a macOS-specific dimension. labels Jul 30, 2024
@alkino
Copy link
Member

alkino commented Jul 30, 2024

Do we think that one day we can fully remove this whole redef.h file? Why is it used for?

@ramcdougal
Copy link
Member

I think functionally this was intended to de facto create a namespace for "hoc" things.

Whether or not it's worth fixing here may depend on how long it takes to get NEURON 9 out if it's already fixed there.

@1uc
Copy link
Collaborator

1uc commented Jul 30, 2024

Is begin the only clash, or other there others too, e.g. data or type. The begin is easily fixed, just remove the #define from the header. The other data and type would be a lot of tedious work.

The fix in 9.0 is to leave the renaming macros mostly intact, but the few that cause issues have been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug building Issue related to build/compilation macOS Issues that have a macOS-specific dimension.
Projects
None yet
Development

No branches or pull requests

4 participants