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

build script tries to install NTL in /usr/local/include/NTL #45

Closed
heiderich opened this issue Jun 11, 2018 · 10 comments
Closed

build script tries to install NTL in /usr/local/include/NTL #45

heiderich opened this issue Jun 11, 2018 · 10 comments
Assignees

Comments

@heiderich
Copy link
Contributor

When executing Pkg.build("Singular"), the build script seems to try to install NTL under /usr/local/include/NTL, which usually fails when executed as a non-privileged user.

make[1]: Leaving directory '/home/florian/.julia/v0.6/Singular/deps/tmpEConDD/ntl-9.3.0/src'
touch all
mkdir -p -m 755 /usr/local/include
rm -rf /usr/local/include/NTL
mkdir -m 755 /usr/local/include/NTL
mkdir: cannot create directory ‘/usr/local/include/NTL’: Permission denied
makefile:427: recipe for target 'install' failed
make: *** [install] Error 1
===============================================[ ERROR: Singular ]================================================

LoadError: failed process: Process(`make install`, ProcessExited(2)) [2]
while loading /home/florian/.julia/v0.6/Singular/deps/build.jl, in expression starting on line 30

==================================================================================================================

=================================================[ BUILD ERRORS ]=================================================

WARNING: Singular had build errors.

 - packages with build errors remain installed in /home/florian/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("Singular")`
 - build a single package by running its `deps/build.jl` script

==================================================================================================================

@wbhart
Copy link
Contributor

wbhart commented Jun 11, 2018 via email

@sebasguts
Copy link
Contributor

According to the comments in NTL's configure script, this seems the right way to use it. Nevertheless, the PREFIX variable is ignored.

@wbhart
Copy link
Contributor

wbhart commented Jun 11, 2018 via email

@sebasguts
Copy link
Contributor

This does not explain any of the difficulties I had on OS X, sorry. And this problem occurs on a Linux machine.

Singular itself works with newer versions of NTL, but I am not sure if this problem is fixed there.

@sebasguts
Copy link
Contributor

TBH, I encountered this problem before, but was too lazy to dig into it. This is why I put the sudo here: https://github.com/oscar-system/OSCARDocker/blob/master/Dockerfile#L67 .

Should I investigate this?

@wbhart
Copy link
Contributor

wbhart commented Jun 11, 2018 via email

@sebasguts
Copy link
Contributor

It basically solved it back then without much hassle for me, so I was fine with doing it in the image. I will investigate this.

@sebasguts sebasguts self-assigned this Jun 11, 2018
@sebasguts
Copy link
Contributor

So, after investigating this, I found the following explanation:

For correctly executing the configure script of ntl, you need a libtool binary in your path. This comes with the Ubuntu/Debian package libtool-bin, and not libtool. If you do not have that binary in your path, ntl's configure errors and does not overwrite ntl's already existing makefile.

Then the build.jl still executes make (which runs fine), and you get an error when build.jl tries to make install ntl.

I guess we should at least try/catch the configure call and see if configure was executed successfully. And then possibly provide a more elaborated error than ntl does by itself. I will implement this.

@heiderich
Copy link
Contributor Author

Thank you for investigating this @sebasguts. After installing libtool-bin I could build this package successfully.

@fingolfin
Copy link
Member

This issue was fixed in NTL 10.1.0, released 2016-10-14 -- perhaps you could switch from NTL 9.3.0 to that, or an even newer version of NTL?

fingolfin added a commit to fingolfin/Singular.jl that referenced this issue Nov 14, 2018
fingolfin added a commit to fingolfin/Singular.jl that referenced this issue Nov 15, 2018
heiderich added a commit to heiderich/OSCARDocker that referenced this issue Dec 10, 2018
Note that this "sudo" was introduced originally as a workaround for
oscar-system/Singular.jl#45
As this issue is resolved, it should not be neccessary anymore.
fingolfin added a commit to fingolfin/Singular.jl that referenced this issue Jun 6, 2023
fingolfin pushed a commit to fingolfin/Singular.jl that referenced this issue Jun 6, 2023
avoid using n_Init with ring as second arugment
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

No branches or pull requests

4 participants