-
Notifications
You must be signed in to change notification settings - Fork 13
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
installing the freesasa python module with gcc 12 and gcc 13 #37
Comments
I should add that the regular (non-python) freesasa (both 2.1.2 and freshly downloaded repo) can be built on the system without any error. The freesasa.c file shows some difference between the 2 cloned repositories (freesasa and freesasa-python). When playing a little more I noticed that adding a "return 0;" statement after the assert macro in the last function of freesasa.c (line 266) resolves the build. I am not sure though if this is acceptable for the code. It is still a mystery why this issues only comes with the python module of freesasa and not with the regular freesasa |
Hmm, thanks for pointing out. Seems compilers are getting stricter. I had a look at the code, and in this particular case it's not an actual error. But I think it's an easy fix to make the compiler happy, so I'll see if I can get un update published. |
Great, thanks. If you can tell why the regular freesasa code builds without issues with the same compiler version and without this return statement, I'd be curious about it. |
I'm not sure, but I assume Cython sets |
gcc -v on my system shows the -Werror=return-type flag but maybe its not actually used when building directly the C code. Now the repo seems to build correctly (last lines of build below). I will have to test it in the context of Haddock3. Thanks a lot. --- last lines of build output --- gcc -Wsign-compare -DNDEBUG -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -IVendor/ -fPIC -Ilib/src -I. -I/usr/include/python3.11 -c lib/src/util.c -o build/temp.linux-x86_64-cpython-311/lib/src/util.o -DHAVE_CONFIG_H -std=gnu99 |
I experimented with compiler flags too, and couldn't trigger the error either. Strange 🤔 Anyway, great to hear that it works now, I will publish a patch later today. |
Ok, I published version 2.2.1 with this fix. If you can verify that that also works for you I think we can close the issue. Thanks again for reporting! |
Great, thanks. Building the git repo works fine but if I download the archives (either .zip or .tar.gz the content of the lib directory is missing. On the other hand I managed to build another software (Haddock3) which requires freesasa using a requirements.txt file in which the freesasa version is set to 2.2.1 . This actually solved the problem I started with in the first place |
Hmm, it could be possible that Github has changed what it packages in the release archives, but you should be able to get the C library by pulling the git submodules. Anyway, I was thinking of the PyPi-package primarily (that's where I assume you got it originally, judging from the logs in the original post). |
Yes, that works well. Thanks a lot for all the help |
Dear all,
I am trying to install the freesasa python module on an updated openSUSE Tumbleweed distribution (gcc 13 and gcc 12). I did the following steps: (i) created a virtual environment with virtualenv with either python 3.9, 3.10, and 3.11; (ii) use pip install freesasa whitin that environment. In all cases (both gcc versions, all 3 python versions) I get the error below when building.
I'd appreciate any insight on how to fix this.
Thanks
Vlad
---- error message ---
Collecting freesasa
Using cached freesasa-2.2.0.post3.tar.gz (223 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: freesasa
Building wheel for freesasa (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [72 lines of output]
Define environment variable USE_CYTHON to build from Cython source
/apps/haddock/3.0/2023-11-15/.venv-python3.9/lib/python3.9/site-packages/setuptools/init.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for freesasa
Running setup.py clean for freesasa
Failed to build freesasa
ERROR: Could not build wheels for freesasa, which is required to install pyproject.toml-based projects
The text was updated successfully, but these errors were encountered: