Comments (11)
Thank you for reaching out. Unfortunately, our team does not often use NJOY on Windows, and I'm not sure the last time we attempted to build it on Windows. I will try to get my hands on a Windows machine and recreate the problem. A quick search tells me this error is Windows-specific and there may be some compile flags we could turn on to fix it. I don't really expect this to help, but you could try an older version of GCC in the meantime.
In any case, I suspect NJOY2016 won't run into the same issues. Thanks for telling us that our installation instructions for it are unclear. These are the commands I would run:
git clone https://github.com/njoy/NJOY2016
cd NJOY2016
mkdir bin && cd bin
cmake ..
make
That should give you version 2016.57 by default. But you could type git checkout 2016.57
or whatever other tag you are looking for after the second line above to be sure.
from njoy21.
Update
The issue is related to two limitations in the Windows PE/COFF object file format:
- A maximum of 32766 sections are allowed
- The string table can't be longer than 10 million bytes
The fix for the first limitation is to add the flag "-Wa,-mbig-obj" to the GCC compilation flags. Note this is a single argument which arranges for the -mbig-obj flag to be passed to the assembler (-Wa).
I modified CMakeLists.txt line 132:
set( njoy21_GNU_CYGWIN_common_flags "-Wno-subobject-linkage" "-Wall" "-Wextra" "-Wpedantic" "-std=gnu++17" "-Wa,-mbig-obj" )
The second limitation I encountered when trying to build the debug version (cmake -DCMAKE_BUILD_TYPE=Debug ...) and is likely just too much debug info being put in the object file. The Release build, compiled with O3 optimization, does not encounter this limit.
So the Release version compiles with the addition of the "-Wa,-mbig-obj" flag.
But, all but the first test failed when I did a "make test". I reduced the optimization to O1 at CMakeLists.txt line 134:
set( njoy21_GNU_CYGWIN_RELEASE_flags "-O1" "-DNDEBUG" )
and it still compiles but fails the same tests. I'll look into this some more.
from njoy21.
Update 2
The tests were failing because shared libraries could not be located. I assume the cmake process is munging LD_LIBRARY_PATH during the "make test" to point at the dlls in ./subprojects, but Cygwin does not use LD_LIBRARY_PATH. Instead it looks for shared libraries on PATH directories.
I copied these dlls to /usr/local/bin (already on my PATH):
- cygnjoy.dll
- cygnjoy_c_bindings.dll
- cygnjoy21.dll
- cygutility.dll
And all tests passed.
from njoy21.
I'm glad that worked, those were the flags I was going to try. We'll hopefully get those implemented into our build system soon so that it works out of the box for future updates. Thanks for being willing to dig into the issue!
from njoy21.
from njoy21.
So I'm glad that you were able to find a workaround for this. Officially, we do not support NJOY running in the Cygwin environment and suggest people use WSL. The only reason for this is that we don't have the resources to test every environment. We are working on improving the build system and hopefully that will improve our options for Windows environments.
from njoy21.
Just to be clear, njoy21.io says:
"Note that in Windows we currently support compiling and running under the Windows Subsystem for Linux or the Cygwin environment. If you have the necesssary components installed, this should also work in the DOS environment."
We should probably change that if we aren't going to officially support Cygwin :)
from njoy21.
Oh
Just to be clear, njoy21.io says:
"Note that in Windows we currently support compiling and running under the Windows Subsystem for Linux or the Cygwin environment. If you have the necesssary components installed, this should also work in the DOS environment."We should probably change that if we aren't going to officially support Cygwin :)
Oops. I thought that it only said WSL. We are going to have to fix that.
from njoy21.
I'm not married to Cygwin wrt NJOY, but the support required was a simple compiler flag. I do use Cygwin apps for a lot of other stuff, particularly my precious Emacs.
from njoy21.
@RokShox Thanks for the input. I agree, pushing your change to the CMakeLists to support Cygwin with the current version is easy enough.
That said, we're currently revamping our build system, so we'll have to have some internal discussions about how to approach the environments we support as part of that. The concern is if we make a big change (e.g., adding a new dependency, upgrading the C++ standard), we need to ensure it works on all officially-supported environments. And right now, we clearly aren't testing Cygwin!
from njoy21.
Yes, of course. I'm not pushing for it.
from njoy21.
Related Issues (20)
- install in Anaconda environment HOT 1
- Processing of MF10 Multi-isotope entries HOT 4
- Segmentation fault (core dumped) with ACER HOT 1
- Beginners quide, FAQ, examples? HOT 4
- Memory consumption at 94% HOT 3
- Segmentation fault in compiling NJOY on Conda enviroment HOT 3
- Segmentation fault when attempting to make (Mac M1) HOT 1
- tape20 and input files for test2 HOT 1
- Can't build v1.1.0 using given instructions HOT 2
- Installation problem HOT 2
- Build fails with deprecated is_literal_type in hana dependency HOT 6
- Build fails with `error: size of array ‘altStackMem’ is not an integral constant-expression` HOT 1
- Comparing two TSL HOT 3
- LEAPR S(alpha,beta) and rho phonon frequency spectrum HOT 2
- Read COVR matrices HOT 2
- NJOY21 installation error HOT 4
- Runtime error: end of file HOT 4
- Error when running ACER with 'suff' equal to '.07' HOT 1
- catch-adapter issue? HOT 1
- Instalation problem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from njoy21.