gdb fails to compile on Leopard - C++11 compiler

Riccardo Mottola riccardo.mottola at libero.it
Fri Jan 26 17:55:44 UTC 2018


Hi Mojca,

thank you for the hints.

On 2018-01-25 12:55:39 +0100 Mojca Miklavec <mojca at macports.org> wrote:


> You can try to add "PortGroup cxx11 1.1" somewhere at the top of the
> Portfile or install the port with
>     port install gdb configure.compiler=<another-compiler> (not sure
> which one though)
> and try again.


I tried adding the former. It looks as if gcc 6 gets used.

The config fshows:

checking for gcc... /opt/local/bin/gcc-mp-6
...
checking whether /opt/local/bin/g++-mp-6 supports C++11 features by 
default... yes


thats a first good start!


Build fails with:

/opt/local/bin/g++-mp-6  -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -m32   
-I. -I. -I./common -I./config 
-DLOCALEDIR="\"/opt/local/share/locale\"" -DHAVE_CONFIG_H 
-I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib 
-I../bfd -I./../bfd -I./../include -I../libdecnumber 
-I./../libdecnumber  -I./gnulib/import -Ibuild-gnulib/import   -DTUI=1 
  -I/opt/local/include  
-I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 
-I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 
-Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function 
-Wno-switch -Wno-char-subscripts -Wempty-body 
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare 
-Wno-narrowing -Wformat-nonliteral  -c -o py-record-full.o -MT 
py-record-full.o -MMD -MP -MF .deps/py-record-full.Tpo 
-fno-strict-aliasing -DNDEBUG -fwrapv python/py-record-full.c
python/py-record-btrace.c: In function 'PyObject* 
recpy_bt_insn_data(PyObject*, void*)':
python/py-record-btrace.c:293:71: error: 'PyBytes_FromStringAndSize' 
was not declared in this scope
    object = PyBytes_FromStringAndSize ((const char*) buffer, 
insn->size);
                                                                        
^
python/py-record-btrace.c: In function 'PyObject* 
recpy_bt_insn_decoded(PyObject*, void*)':
python/py-record-btrace.c:331:56: error: 'PyBytes_FromString' was not 
declared in this scope
    return PyBytes_FromString (strfile.string ().c_str ());
                                                         ^
make[2]: *** [py-record-btrace.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory 
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gdb/gdb/work/gdb-8.0.1/gdb'
make[1]: *** [all-gdb] Error 2


still a compiler error?


> In any case this means that the Portfile should be fixed. It doesn't
> necessarily mean that it would actually work once this gets fixed.

Well, first it needs to compile before running :)

Riccardo



More information about the macports-users mailing list