mrklein / openfoam-os-x

Patches for OpenFOAM(R) to build it on OS X
93 stars 33 forks source link

Error during installation #29

Closed deOliveira-R closed 7 years ago

deOliveira-R commented 7 years ago

Hi. I'm getting a lot of errors during compilation for file "/Users/MadScientist/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C" as shown in the attached log.

Any idea?

log.Allwmake.txt

mrklein commented 7 years ago

Hi,

Since the error is in flex generated files we could start diagnose with programs versions. Could you post output of:

deOliveira-R commented 7 years ago

Hi Alexey,

You hit the bull’s eye. Cpp was pointed towards MacPorts gcc. I’ve since uninstalled MacPorts, and got it pointed to Clang and managed to compile apparently. I'm now testing everything and facing run problems such as:

Running blockMesh on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavity /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32577 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running icoFoam on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavity /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32587 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Cloning cavityFine case from cavity Running blockMesh on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityFine /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32597 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running mapFields from cavity to cavityFine ./Allrun: line 16: 32598 Abort trap: 6 mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1 Running icoFoam on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityFine /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32604 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running blockMesh on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityGrade /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32606 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running mapFields from cavityFine to cavityGrade ./Allrun: line 16: 32607 Abort trap: 6 mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1 Running icoFoam on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityGrade /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32613 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Cloning cavityHighRe case from cavity Setting cavityHighRe to generate a secondary vortex Copying cavity/0* directory to cavityHighRe Running blockMesh on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityHighRe /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32624 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running icoFoam on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityHighRe /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32630 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running blockMesh on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityClipped /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32632 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1 Running mapFields from cavity to cavityClipped ./Allrun: line 10: 32634 Abort trap: 6 mapFields $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1 Running icoFoam on /Users/MadScientist/OpenFOAM/MadScientist-4.1/run/cavity/cavityClipped /Users/MadScientist/OpenFOAM/OpenFOAM-4.1/bin/tools/RunFunctions: line 67: 32640 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1

Which I expect to be related to SIP from the latest OSX as I read in your page since it follows exactly the behaviour you mention that echo command outputs the variables but running from a shell script doesn't (I'm a beginner but I do my homework at least). You mention in the page that this is related to OpenFOAM executing from a non-standard location and offer the choices of sourcing in the script or disabling SIP. Is there any reason why you didn't suggest moving the installation to some fairly standard place such as /opt? Would it solve the issue as well?

I would personally like to have it properly installed on the system and with $PATH set up if that is the right way to do it. This is really my personal research computer so I would like to make my analysis as convenient as possible since I expect do many of them (starting a PhD not using OpenFOAM).

Soon I will exchange my Mac as well, so I will replicate the steps to a successful installation and set up.

Best regards, Rodrigo

mrklein commented 7 years ago

It is difficult to say whether it is related to SIP, or to wrong environment setup, or to compilation error. Could you post content of log-file (files if they are different) created during the run? Also if you are running tests with foamRunTutorials or Allrun file in tutorials folder, they already contain workaround for SIP.

Personally I would also prefer if OpenFOAM a) supported OS X without patches, b) could be installed on case-insensitive file system, c) followed FHS, d) were modular. This is not the case. So on OS X you have to install it on disk image, mount disk image, setup environment (well, this step is not macOS-specific). I have tried to make life easier with openfoam-env-setup.sh (see https://github.com/mrklein/openfoam-os-x/wiki/Post-configuration) but surely it is not as convenient as system-wide installed application.

deOliveira-R commented 7 years ago

Sorry for the delay Alexey.

I checked the logs and basically the libraries are still pointed to MacPorts due to my use of it before. I decided it is too much of a bother to do all the adjustments necessary to change from MacPorts to Homebrew. Instead, I will do a whole system data backup, format and start anew. This way it should work with minimal bother to me and you.

Thank you for the tips in diagnosing. It was only a short while, but I learned something already!

Btw, there is a new file-system set to replace HFS+ for macOS on the pipeline (set for 2017 release for boot partition) which is case-sensitive by default. This should be a remedy to the situation. I am a patient person, so I am willing to reformat next year and redo everything for added benefit.

After I finish the procedure and install the system from fresh state, if I have a genuine problem (like not a problem such as this time, which I did an installation that is out of scope) I will scream for help again, because if that happens it will be genuine! Ahahaha

Cheers

Em 9 de dez de 2016, à(s) 08:51, Alexey Matveichev notifications@github.com escreveu:

It is difficult to say whether it is related to SIP, or to wrong environment setup, or to compilation error. Could you post content of log-file (files if they are different) created during the run? Also if you are running tests with foamRunTutorials or Allrun file in tutorials folder, they already contain workaround for SIP.

Personally I would also prefer if OpenFOAM a) supported OS X without patches, b) could be installed on case-insensitive file system, c) followed FHS, d) were modular. This is not the case. So on OS X you have to install it on disk image, mount disk image, setup environment (well, this step is not macOS-specific). I have tried to make life easier with openfoam-env-setup.sh (see https://github.com/mrklein/openfoam-os-x/wiki/Post-configuration https://github.com/mrklein/openfoam-os-x/wiki/Post-configuration) but surely it is not as convenient as system-wide installed application.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mrklein/openfoam-os-x/issues/29#issuecomment-265963767, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ8-4Ig_XJS0aPt0oQqUMnJLa2EOYa0sks5rGRaBgaJpZM4LHeKQ.

mrklein commented 7 years ago

I thought that uninstallation of Macports is a matter of two lines (https://guide.macports.org/chunked/installing.macports.uninstalling.html), and Homebrew installation is one-liner. It seems I was wrong, or maybe you just dislike your current installation.

Concerning APFS, we will see. At certain point there were plans for ZFS on OS X, which are buried now. In fact you can format you boot partition using case-sensitive HFS+, yet, since default option is case-insensitive, Google is full of warnings, that case-sensitivity could break certain software. Never tried to verify these warnings.

Shall we close issue?

deOliveira-R commented 7 years ago

I thought so as well, but it didn’t quite work and everything still compiles with funky libraries that don’t get properly connected. Maybe the MacPorts installation has been modified right after upgrading OS X.

Let’s close the issue. Thank you for all your help and Merry Xmas!

Em 14 de dez de 2016, à(s) 08:27, Alexey Matveichev notifications@github.com escreveu:

I thought that uninstallation of Macports is a matter of two lines (https://guide.macports.org/chunked/installing.macports.uninstalling.html https://guide.macports.org/chunked/installing.macports.uninstalling.html), and Homebrew installation is one-liner. It seems I was wrong, or maybe you just dislike your current installation.

Concerning APFS, we will see. At certain point there were plans for ZFS on OS X, which are buried now. In fact you can format you boot partition using case-sensitive HFS+, yet, since default option is case-insensitive, Google is full of warnings, that case-sensitivity could break certain software. Never tried to verify these warnings.

Shall we close issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mrklein/openfoam-os-x/issues/29#issuecomment-266973086, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ8-4Frr-10VMIE4wOFjTuwlnsmXtfVVks5rH6iCgaJpZM4LHeKQ.