Fix for 'long long long' is too long on Fedora 10 x86_64

Mark Patterson <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
Hello,

A while back, someone posted a question about the error:
     /usr/include/libguile/scmconfig-64.h:83: error: ‘long long long’  
is too long for GCC
but no fix was posted. I ran into this issue and am posting my  
resolution in case anyone else runs into it.

I'm running Fedora 10 x86_64 with guile 1.8.5 and HDF5 1.8.1.

HDF5 /usr/include/H5public.h near line 127 has:
  #if H5_SIZEOF_LONG_LONG>0
  #   define long_long    long long
  ... snip ...
  #endif
which is still present in the latest 1.8.2 release.

Guile /usr/include/libguile/scmconfig-64.h near line 83 has:
  typedef long long long_long;
I tracked the origin of this line to gen-scmconfig.c, line 287 and it  
is present in the recent 1.8.6 release.

If HDF5 is loaded before guile, the typedef becomes:
  typedef long long long long
which confuses gcc (and me). As a temporary fix, I added:
  #undef long_long
just before the typedef in scmconfig-64. It's not an elegant solution  
but it works.

The HDF5 folks said they'd think about fixing this:
> From: [email protected]
> Date: February 9, 2009 2:27:54 PM GMT-05:00
> To: Mark Patterson <...snip...>
> Subject: Re: Conflict with Guile
>
> Hello Mark,
>
> I checked with the developers on this.   They said the
> long_long hack was added to the code to pacify Windows compilers.  
> However, it looks like it may no longer be needed, as Visual Studio  
> 2003/.NET, 2005, and 2008 say they support it now.
>
> I'll enter a bug report for us to investigate and remove this from  
> HDF5.
>
> Thanks!
> -Barbara
>
> +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
> Barbara Jones
> THG Helpdesk
>
> The HDF Group (THG)
> [email protected]
> +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+


Thank you,
Mark Patterson
Department of Physics
Queen's University, Kingston, Canada

_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.