Re: python (was: Re: [Help-gnucap] getting started with gnucap)

Patrick Mulder <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <CAEx2pdf2kZTp3-GdJ_RqfSLOWTdAgyrUOebxEN3vKs5ejObMNQ@mail.gmail.com>
On Sun, Feb 11, 2018 at 6:12 PM, Felix Salfelder <[email protected]>
wrote:

> On Sun, Feb 04, 2018 at 05:00:05PM +0100, Felix Salfelder wrote:
> > if henjos stuff seems fixable [..]
>
> it looks really interesting.
>
> the code was still using the pre-library gnucap headers. these have been
> sorted.
>
> i've uploaded sth that builds against the latest snapshot [1].  there's
> probably some more work to do...


Thanks, on my MacOS X (unfortunately, my dev machine for now), I do:

1) git clone https://github.com/gnucap/gnucap-python

2) In autogen.sh I replace libtoolize with glibtoolize.

3) I rund ./autogen.sh

4) In the resulting Makefile I update the numpy reference - not sure what's
the best approach for this, but this worked:

CXXFLAGS = -g -O2
-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/


5) I run make:

libtool: compile:  g++ -DHAVE_CONFIG_H -I.
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-DPYTHON_SO=\"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Python.framework/Versions/2.7/Python\"
-g -O2
-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/
-MT python_la-gnucap.lo -MD -MP -MF .deps/python_la-gnucap.Tpo -c
gnucap.cc  -fno-common -DPIC -o .libs/python_la-gnucap.o
In file included from gnucap.cc:9:
In file included from ./numpy_interface.h:3:
In file included from
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:4:
In file included from
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarraytypes.h:1760:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:
warning:
      "Using deprecated NumPy API, disable it by " "#defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
gnucap.cc:19:3: warning: 'tmpnam' is deprecated: This function is provided
for compatibility reasons only. Due to security concerns inherent in the
      design of tmpnam(3), it is highly recommended that you use mkstemp(3)
instead. [-Wdeprecated-declarations]
  tmpnam(filename);
  ^
/usr/include/stdio.h:276:7: note: 'tmpnam' has been explicitly marked
deprecated here
char    *tmpnam(char *);
         ^
gnucap.cc:25:60: error: incomplete type 'CARD_LIST' named in nested name
specifier
  CMD::command(std::string("> ") + std::string(filename),
&CARD_LIST::card_list);
                                                           ^~~~~~~~~~~
/usr/local/include/gnucap/e_card.h:34:7: note: forward declaration of
'CARD_LIST'
class CARD_LIST;
      ^
gnucap.cc:27:39: error: incomplete type 'CARD_LIST' named in nested name
specifier
  CMD::command(std::string(command), &CARD_LIST::card_list);
                                      ^~~~~~~~~~~
/usr/local/include/gnucap/e_card.h:34:7: note: forward declaration of
'CARD_LIST'
class CARD_LIST;
      ^
gnucap.cc:29:22: error: incomplete type 'CARD_LIST' named in nested name
specifier
  CMD::command(">", &CARD_LIST::card_list);
                     ^~~~~~~~~~~
/usr/local/include/gnucap/e_card.h:34:7: note: forward declaration of
'CARD_LIST'
class CARD_LIST;
      ^
2 warnings and 3 errors generated.
make[1]: *** [python_la-gnucap.lo] Error 1
make: *** [all] Error 2
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.