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

Error: GPGME was compiled with _FILE_OFFSET_BITS = 64 #779

Closed
asdil12 opened this issue Mar 31, 2016 · 6 comments
Closed

Error: GPGME was compiled with _FILE_OFFSET_BITS = 64 #779

asdil12 opened this issue Mar 31, 2016 · 6 comments

Comments

@asdil12
Copy link
Contributor

asdil12 commented Mar 31, 2016

When compiling current master, I get this error message:

In file included from src/pgp/gpg.c:45:0:
/usr/include/gpgme.h:102:2: Fehler: #error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual.
 #error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual.
  ^

src/pgp/gpg.c:

...
#include "prof_config.h"
...

src/prof_config.h:

...
/* Number of bits in a file offset, on hosts where this is settable. */
#ifndef PROF__FILE_OFFSET_BITS
#define PROF__FILE_OFFSET_BITS 64
#endif
...

/usr/include/gpgme.h:

...
#if 64                                                                                                                                                                                                              
#ifndef _FILE_OFFSET_BITS
#error GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME manual.
#else
#if (_FILE_OFFSET_BITS) != (64)
#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely 64, please see the section "Largefile support (LFS)" in the GPGME manual.
#endif
#endif
#endif
...

Looks like as if the define name doesn't match:
PROF__FILE_OFFSET_BITS vs _FILE_OFFSET_BITS
When I add this into src/pgp/gpg.c profanity compiles:

#ifdef PROF__FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS PROF__FILE_OFFSET_BITS
#endif
asdil12 added a commit to asdil12/profanity that referenced this issue Mar 31, 2016
@pasis
Copy link
Member

pasis commented Mar 31, 2016

From gpgme documentation doc/gpgme.info-1:

   On POSIX platforms you can enable largefile support, if it is
different from the default on the system the application is compiled on,
by using the Autoconf macro ‘AC_SYS_LARGEFILE’.  If you do this, then
you don’t need to worry about anything else: It will just work...

   If you do not use Autoconf, you can define the preprocessor symbol
‘_FILE_OFFSET_BITS’ to 64 _before_ including any header files, for
example by specifying the option ‘-D_FILE_OFFSET_BITS=64’ on the
compiler command line...

I think user shouldn't manually work with _FILE_OFFSET_BITS. And if gpgme-config doesn't provide correct cflags (for example, fuse provides) changes should be made in configure.ac.

@asdil12
Copy link
Contributor Author

asdil12 commented Mar 31, 2016

The defines seem to be in src/config.h without the PROF_ prefix.

This commit seems to have broken it:
41fe8c2#diff-6ed1ebe0d360f52954c177c229d66d0a

@asdil12
Copy link
Contributor Author

asdil12 commented Mar 31, 2016

This will fix compilation:

diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c
index 8900915..db87657 100644
--- a/src/pgp/gpg.c
+++ b/src/pgp/gpg.c
@@ -33,6 +33,7 @@
  */

 #include "prof_config.h"
+#include "config.h"

 #include <locale.h>
 #include <string.h>

asdil12 added a commit to asdil12/profanity that referenced this issue Mar 31, 2016
@boothj5
Copy link
Collaborator

boothj5 commented Mar 31, 2016

The original reason for adding AX_PREFIX_CONFIG_H which is prefixing all #define with PROF_ was to avoid a naming clash with the Ruby development package in the plugins branch.

I've removed this macro and the prefix from all usages, since master only includes Python and C plugin support. The plugins branch is out of date now anyway, so once I start looking into Ruby plugins again I'll try to find a better fix.

If you get a change to build latest master, let me know if its fixed.

Thanks.

@asdil12
Copy link
Contributor Author

asdil12 commented Mar 31, 2016

It compiles and runs.

@boothj5
Copy link
Collaborator

boothj5 commented Mar 31, 2016

Cheers.

@boothj5 boothj5 closed this as completed Mar 31, 2016
jubalh added a commit that referenced this issue Sep 29, 2021
There most likely won't ever be Ruby plugins.

Regards #779
jubalh added a commit that referenced this issue Sep 29, 2021
There most likely won't ever be Ruby plugins.

Regards #779
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

Successfully merging a pull request may close this issue.

3 participants