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

Add Mac os x installation scripts #46

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Conversation

nsryan2
Copy link
Contributor

@nsryan2 nsryan2 commented Aug 10, 2020

This PR adds a macosx.sh file (which is a replica of the the ubuntu_mint.sh) and a osx_10.15.06.sh file (which is a replica of the ubuntu_16.04.sh file). They have been adapted to hopefully work on mac.

nsryan2 and others added 5 commits August 10, 2020 13:05
…ackages

Packages replaced:
- build-essential
- python-software-properties
- software-properties-common

These packages are not for MacOS, and are not available through brew install or pip, so I went through the different parts of them and picked out what seemed to be relavent (as well as what was able to be installed through brew and pip) to Mac and added it.
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

small problem pip

macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
osx_10.15.6.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
macosx.sh Outdated Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
macosx.sh Outdated Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
macosx.sh Outdated Show resolved Hide resolved
macosx.sh Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
macosx.sh Outdated Show resolved Hide resolved
@bam241
Copy link
Member

bam241 commented Aug 11, 2020

you also need to change the permission of macosx.sh and ox.????.sh scripts to executable

@gonuke
Copy link
Contributor

gonuke commented Aug 11, 2020

You'll want to exclude the .DS_Store file/directory from your PR. Also might be useful to keep the shell script and dockerfile in different PRs. I think docker may be even more challenging...

@nsryan2
Copy link
Contributor Author

nsryan2 commented Aug 11, 2020

My bad, I pushed changes to the wrong branch when I changed the permissions so those got wrapped up in it. I thought I deleted that dockerfile. Thanks for the note

@nsryan2 nsryan2 requested a review from bam241 August 12, 2020 14:28
macosx.sh Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
@bam241 bam241 requested a review from gonuke August 12, 2020 18:20
Copy link
Member

@bam241 bam241 left a comment

Choose a reason for hiding this comment

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

LGTM! thx @nsryan2

Copy link
Contributor

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

For long term maintenance purposes, I'm comparing this to the ubuntu_mint version. Are all differences strictly necessary?

-DCMAKE_INSTALL_PREFIX=${install_dir}/moab
make
make install

Copy link
Contributor

Choose a reason for hiding this comment

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

Difference from Ubuntu: why not update the ENV Variables directly here (instead of sourcing .bashrc below)?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should update the linux version accordingly:

I see 2 advantages:

  • simplify the scripts
  • allow to check if .bashrc if properly formed

macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated
TAG=$(git describe --abbrev=0 --tags)
git checkout tags/`echo $TAG` -b `echo $TAG`
fi
python setup.py install --user -- -DMOAB_LIBRARY=$install_dir/moab/lib -DMOAB_INCLUDE_DIR=$install_dir/moab/include
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like an "old-fashioned" way to configure setup.py. Why not the --moab and --dagmc options? Also, no DAGMC? Is that not possible?

Copy link
Member

Choose a reason for hiding this comment

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

fixing this right now

macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
macosx.sh Outdated Show resolved Hide resolved
Co-authored-by: Baptiste Mouginot <[email protected]>
@gonuke
Copy link
Contributor

gonuke commented Aug 15, 2020

An item to confirm/test for @bam241 or @nsryan2:

  1. we currently prevent building of the spatial solvers on macOS, apparently in 2 separate places: https://github.com/pyne/pyne/blob/develop/src/CMakeLists.txt#L67 and https://github.com/pyne/pyne/blob/develop/cmake/PyneMacros.cmake#L151

Do we need both of these, or can we rely on the one in PyneMacros?

  1. Can we actually support building the spatial solvers on MacOS? This may be a more challenging question.

@nsryan2
Copy link
Contributor Author

nsryan2 commented Sep 1, 2020

I keep getting the error asking for a stdio.h file, but I'm not sure how to make or install one. This failure happens in the moab part of the install, is there a package or file I can install separately to prevent this?

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdio.h:107:15: fatal error:
'stdio.h' file not found
#include_next <stdio.h>
^~~~~~~~~
1 error generated.
error: command '/Library/Developer/CommandLineTools/usr/bin/cc' failed with exit status 1
make[2]: *** [pymoab/CMakeFiles/pymoab-local-install] Error 1
make[1]: *** [pymoab/CMakeFiles/pymoab-local-install.dir/all] Error 2
make: *** [all] Error 2

Edit:
Upon further examination, I do have a couple stdio.h files, one of which is located at /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h

@katyhuff
Copy link
Member

katyhuff commented Sep 1, 2020

Double check your installation of xcode's command-line tools. frida/frida#338

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.

4 participants