gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] gnucap-python


From: Felix Salfelder
Subject: Re: [Gnucap-devel] gnucap-python
Date: Tue, 10 Apr 2018 21:43:07 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Apr 10, 2018 at 08:54:17PM +0200, Patrick Mulder wrote:
> I am trying to build from your github repo on an Ubuntu machine:
> 
> ....
> ** Configuration summary for gnucap-python 0.0.0:
> 
>    prefix:                   /usr/local
>    CPPFLAGS:
>    GC_CPPFLAGS:              -I/usr/local/include/gnucap
>    CFLAGS:                   -g -O2
>    CXXFLAGS:                 -g -O2
>    LDFLAGS:                   -rdynamic -L/usr/local/lib
>    LIBS:
> 
> Then make:
> 
> make[2]: Entering directory
> '/home/patrick/projects/gnucap/gnucap-python/gnucap'
> /bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
> -I..  -I../include -I/usr/include/python2.7  -I/usr/local/include/gnucap
> -DPYTHON_SO=\"/usr/lib/libpython2.7.so\"   -g -O2 -MT
> _globals_la-_globals.lo -MD -MP -MF .deps/_globals_la-_globals.Tpo -c -o
> _globals_la-_globals.lo `test -f '_globals.cxx' || echo './'`_globals.cxx
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include
> -I/usr/include/python2.7 -I/usr/local/include/gnucap -DPYTHON_SO=\"/usr/lib/
> libpython2.7.so\" -g -O2 -MT _globals_la-_globals.lo -MD -MP -MF
> .deps/_globals_la-_globals.Tpo -c _globals.cxx  -fPIC -DPIC -o
> .libs/_globals_la-_globals.o
> _globals.cxx:4171:14: error: ‘shared_ptr’ in namespace ‘std’ does not name
> a template type
>  typedef std::shared_ptr< card_install > shared_card_installer;
>               ^
> _globals.cxx:4173:1: error: ‘shared_card_installer’ does not name a type
>  shared_card_installer install_device(char const*name, CARD *card) {
> untested();

I used shared pointers to trick the python garbage collector.
(not sure if it works the way i want, memory leak, but close).

shared pointers are only available from c++11. so you'd need to use a
recent compiler (such as gcc>=5.8 or so?) or pass -std=c++11 to an older
gcc (maybe >=4.9?)

try
$ make CXXFLAGS=-std=c++11\ -O2
or
$ make CXX=g++\ -std=c++11

maybe
$ ./configure CXXFLAGS=-std=c++11
also does the trick.

hth
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]