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

ABI=32 on 64-bit system missing -D__USE_FILE_OFFSET64 (?) #971

Closed
markuspf opened this issue Dec 2, 2016 · 10 comments
Closed

ABI=32 on 64-bit system missing -D__USE_FILE_OFFSET64 (?) #971

markuspf opened this issue Dec 2, 2016 · 10 comments

Comments

@markuspf
Copy link
Member

markuspf commented Dec 2, 2016

Configuring and compiling GAP as follows on a 64 bit system

# ./configure --with-gmp=system ABI=32
# gmake

yields a runnable executable, but sometimes GAP does not start complaining that it cannot find GAPDoc (even though this is installed, because the directory has a 64 bit ino for instance).

I traced this down to a call to stat in src/sysfiles.c:3756, it errors with errno set to 75 (value too large for datatype). This can be addressed by compiling GAP with -D__USE_FILE_OFFSET64 where available.

In a PR I will fix the functions FuncIsDirectoryPath and SyIsDirectoryPath to properly deal with failures and errno, to return fail instead of false.

@olexandr-konovalov
Copy link
Member

@markuspf thanks for digging this out. Do you know why it did not happen on Jenkins slaves which we have used before?

@markuspf
Copy link
Member Author

markuspf commented Dec 4, 2016

I'd have to look more in detail, but it'll have something to do with the filesystem having 64bit inode numbers, or something to a similar effect.

@markuspf
Copy link
Member Author

markuspf commented Dec 13, 2016

Do @fingolfin or @ChrisJefferson have any opinion (or better knowledge) on this?

@olexandr-konovalov
Copy link
Member

We have a new Jenkins slave in St Andrews which has this problem and throws test failure notifications every evening in the worst possible way: GAP can not be loaded in this configuration at all because GAPDoc package can not be loaded:

#I  gapdoc package is not available. Check that the name is correct
#I  and it is present in one of the GAP root directories (see '??RootPaths')
#I  GAP: needed package gapdoc cannot be loaded

@fingolfin
Copy link
Member

I think the correct way to do this is to #define _FILE_OFFSET_BITS=64, but only if the system really sypports 64bit inodes (at least the glibc documentation demands this).
Autoconf has a macro for this, which we hopefully can use: AC_SYS_LARGEFILE

While I could add it (it needs to be added to cnf/configure.in), I cannot reliably test it. So perhaps somebody who has a test setup can verify it works? Otherwise, I'll create a PR and "test by proxy" (i.e. check that all the right #defines are set).

Oh, and this of course should then also go into the new build syste,.

@markuspf
Copy link
Member Author

markuspf commented Dec 22, 2016

I have a system here that I can test this on. I think I can give you access to it if you're willing to tunnel your ssh through one of {yin,babbage,lovelace}, I'd need a ssh pubkey from you for that.

@fingolfin
Copy link
Member

Can this be closed, now that #1033 has been merged?

@olexandr-konovalov
Copy link
Member

Great - Jenkins tests now do not trip over this problem. Thanks!

@olexandr-konovalov
Copy link
Member

@markuspf shall we fix this in stable-4.8 branch too? I am testing GAP 4.8.7 release candidate, and its shows up there on the same Jenkins slave. Alternatively, I can just disable testing 32-bit builds on that slave until GAP 4.9 will be out - perhaps nobody builds GAP in 32-bit mode on relatively modern 64-bit machines, otherwise we would hear about such problems already.

@olexandr-konovalov
Copy link
Member

Ok, cherry picking works - should be fixed in GAP 4.8.7 then.

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

3 participants