Project

General

Profile

Bug #401

build errors in MapCppBeamMaker_wrap.cc

Added by Robinson, Matthew about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
25 March 2011
Due date:
% Done:

100%

Estimated time:
Workflow:

Description

scons: Building targets ...
g++ -o src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.os -c -Dlong32='int' "-Dlong64='long long'" -m64 -pthread -rdynamic -g -pg -fPIC -Ithird_party/install/include -Ithird_party/install/include/python2.7 -Ithird_party/install/include/root -Isrc/common -Ithird_party/build/root_v5.28.00a/include -Ithird_party/build/geant4.9.2.p04/include -I. -Isrc/map/MapCppBeamMaker src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc: In function 'int SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc:2051: error: invalid conversion from 'const char*' to 'char*'
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**, size_t*, int*)':
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc:2579: error: cannot convert 'int*' to 'Py_ssize_t*' for argument '3' to 'int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)'
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc: In function 'void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)':
src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.cc:3291: error: invalid conversion from 'const char*' to 'char*'
scons: * [src/map/MapCppBeamMaker/build/MapCppBeamMaker_wrap.os] Error 1
scons: building terminated because of errors.
make: *
[all] Error 2

Easily fixed by changing various declarations of type char* to const char* and of int to Py_ssize_t.

This may have shown up because I'm using gcc 4.3, but gcc 4.3 is very common on rhel5 derived systems because it's the only compiler fully tested for use with root and lhc and cern software.

#1

Updated by Robinson, Matthew about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Okay. Now I see that this code was auto-generated by swig.
Installing swig v2 fixes it.

#2

Updated by Tunnell, Christopher almost 12 years ago

  • Target version set to MAUS-v0.0.1

Also available in: Atom PDF