![](https://secure.gravatar.com/avatar/0949db35c968fd7a0f522f31b259efeb.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi, I have problems compiling MDT. Running scons gives me this error message:
scons: Reading SConscript files ... Determining sizeof(void *)... (cached) 8 Checking whether compiler supports -fvisibility...(cached) yes Checking for GLib2 using pkg-config...(cached) found, headers in /usr/include/glib-2.0 Checking for C header file hdf5.h... (cached) yes Checking for MODELLER using 'modeller' scons option...(cached) /afs/ics.muni.cz/home/pirat/modeller9.13 Checking for SWIG >= 1.3.39: 3.0.5 found Checking for numpy... not found scons: done reading SConscript files. scons: Building targets ... gcc -pthread -o pyext/mdt_wrap.os -c -Wall -g -O3 -fPIC - -fno-strict-aliasing -g -fwrapv -O3 -Wall -Wstrict-prototypes - -I/afs/ics.muni.cz/home/pirat/hdf-1.8.10/include - -I/afs/ics.muni.cz/home/pirat/lib/glib-2.44.1/include - -I/software/python-2.7.6/gcc/include/python2.7 - -I/afs/ics.muni.cz/home/pirat/modeller9.13/src/include - -I/afs/ics.muni.cz/home/pirat/modeller9.13/src/include/x86_64-intel8 - -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include pyext/mdt_wrap.c pyext/mdt_wrap.c:3433:3: error: invalid preprocessing directive #Wrap
this is my config.py, written as advised, as I have dependencies in custom directories:
# modeller path modeller = '/afs/ics.muni.cz/home/pirat/modeller9.13' # SWIG and pkg-config path path = '/afs/ics.muni.cz/home/pirat/swig-3.0.5/bin:/usr/bin' # hdf5 and glib-2.44.1 includepath = '/afs/ics.muni.cz/home/pirat/hdf-1.8.10/include:/afs/ics.muni.cz/home/pirat/lib/glib-2.44.1/include'
best, martin
![](https://secure.gravatar.com/avatar/cfe8857a24d561e8e700ab18e3ba7ec8.jpg?s=120&d=mm&r=g)
On 5/18/15 7:58 AM, Martin Plutinský wrote: > I have problems compiling MDT. Running scons gives me this error message: ... > pyext/mdt_wrap.c:3433:3: error: invalid preprocessing directive #Wrap
This is because you're using a newer version of SWIG; they made it a bit more strict in later versions. The fix is simple though - edit pyext/mdt.i and change this line:
# Wrap MDT types
to instead read
/* Wrap MDT types */
Then rerun scons.
Ben
![](https://secure.gravatar.com/avatar/0949db35c968fd7a0f522f31b259efeb.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thanks, that problem is solved, but this time scons has given me another error:
src/mdt_atom_classes.c: In function 'read_atom_class_file': src/mdt_atom_classes.c:273:3: error: passing argument 1 of 'mod_file_read_contents' from incompatible pointer type [-Werror] In file included from src/mdt_atom_classes.c:8:0: /afs/ics.muni.cz/home/pirat/modeller9.13/src/include/mod_file.h:103:10: note: expected 'struct mod_file *' but argument is of type 'struct FILE *' src/mdt_atom_classes.c:273:3: error: too many arguments to function 'mod_file_read_contents' In file included from src/mdt_atom_classes.c:8:0: /afs/ics.muni.cz/home/pirat/modeller9.13/src/include/mod_file.h:103:10: note: declared here cc1: all warnings being treated as errors scons: *** [src/mdt_atom_classes.os] Error 1 scons: building terminated because of errors.
While looking backwards in log:
Checking for GLib2 using pkg-config...(cached) found, headers in /usr/include/glib-2.0
it is clear, that scons somehow found an older version of glib (2.4+ is needed), altough I have defined correct one in config.py.
best, martin
Dňa 18.05.2015 o 18:56 Ben Webb napísal(a): > On 5/18/15 7:58 AM, Martin Plutinský wrote: >> I have problems compiling MDT. Running scons gives me this error >> message: > ... >> pyext/mdt_wrap.c:3433:3: error: invalid preprocessing directive >> #Wrap > > This is because you're using a newer version of SWIG; they made it > a bit more strict in later versions. The fix is simple though - > edit pyext/mdt.i and change this line: > > # Wrap MDT types > > to instead read > > /* Wrap MDT types */ > > Then rerun scons. > > Ben
![](https://secure.gravatar.com/avatar/cfe8857a24d561e8e700ab18e3ba7ec8.jpg?s=120&d=mm&r=g)
On 5/18/15 11:09 AM, Martin Plutinský wrote: > that problem is solved, but this time scons has given me another error: ... > src/mdt_atom_classes.c:273:3: error: passing argument 1 of > 'mod_file_read_contents' from incompatible pointer type [-Werror]
Ah, this is because the Modeller file API changed in Modeller 9.13, and MDT hasn't yet been updated to match. I'll push a new MDT release in the next day or so - it'll be announced on this list.
> Checking for GLib2 using pkg-config...(cached) found, headers in > /usr/include/glib-2.0 > > it is clear, that scons somehow found an older version of glib (2.4+ > is needed), altough I have defined correct one in config.py.
No, that looks fine. glib is generally found in the "glib-2.0" directory, even if it's a newer version of glib.
Ben
![](https://secure.gravatar.com/avatar/0949db35c968fd7a0f522f31b259efeb.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thanks again, I will wait for download link of announced version
mp
Dňa 19.05.2015 o 03:31 Ben Webb napísal(a): > On 5/18/15 11:09 AM, Martin Plutinský wrote: >> that problem is solved, but this time scons has given me another >> error: > ... >> src/mdt_atom_classes.c:273:3: error: passing argument 1 of >> 'mod_file_read_contents' from incompatible pointer type >> [-Werror] > > Ah, this is because the Modeller file API changed in Modeller 9.13, > and MDT hasn't yet been updated to match. I'll push a new MDT > release in the next day or so - it'll be announced on this list. > >> Checking for GLib2 using pkg-config...(cached) found, headers in >> /usr/include/glib-2.0 >> >> it is clear, that scons somehow found an older version of glib >> (2.4+ is needed), altough I have defined correct one in >> config.py. > > No, that looks fine. glib is generally found in the "glib-2.0" > directory, even if it's a newer version of glib. > > Ben
participants (2)
-
Ben Webb
-
Martin Plutinský