Opened 20 months ago

Closed 3 months ago

Last modified 5 weeks ago

#959 closed defect (fixed)

BUILD: errors building C-extensions in Python3.6

Reported by: andyfaff Owned by:
Priority: minor Milestone: SasView 4.2.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

I decided to trying building sasview on Python=3.6 (numpy 1.12). I got the following error while building extensions. PyCObject doesn't exist in Python>3.2 and was replaced by PyCapsules?:

running build_ext
Compiling with unix (64bit=True)
building 'sas.sascalc.calculator.core.sld2i' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/src
creating build/temp.macosx-10.7-x86_64-3.6/src/sas
creating build/temp.macosx-10.7-x86_64-3.6/src/sas/sascalc
creating build/temp.macosx-10.7-x86_64-3.6/src/sas/sascalc/calculator
creating build/temp.macosx-10.7-x86_64-3.6/src/sas/sascalc/calculator/c_extensions
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/anz/miniconda3/envs/sasview3/include -arch x86_64 -I/Users/anz/miniconda3/envs/sasview3/include -arch x86_64 -Isrc/sas/sascalc/calculator/c_extensions -I/Users/anz/miniconda3/envs/sasview3/include/python3.6m -c src/sas/sascalc/calculator/c_extensions/sld2i_module.cpp -o build/temp.macosx-10.7-x86_64-3.6/src/sas/sascalc/calculator/c_extensions/sld2i_module.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean

'-Werror=unused-command-line-argument'? [-Wunknown-warning-option]

src/sas/sascalc/calculator/c_extensions/sld2i_module.cpp:73:9: error: use of undeclared identifier 'PyCObject_FromVoidPtr'

return PyCObject_FromVoidPtr(sld2i, del_sld2i);


src/sas/sascalc/calculator/c_extensions/sld2i_module.cpp:99:15: error: use of undeclared identifier 'PyCObject_AsVoidPtr'

void *temp = PyCObject_AsVoidPtr(gen_obj);


src/sas/sascalc/calculator/c_extensions/sld2i_module.cpp:127:15: error: use of undeclared identifier 'PyCObject_AsVoidPtr'

void *temp = PyCObject_AsVoidPtr(gen_obj);


src/sas/sascalc/calculator/c_extensions/sld2i_module.cpp:155:5: error: use of undeclared identifier 'Py_InitModule3'

Py_InitModule3("sld2i", module_methods, "Sld2i module");

1 warning and 4 errors generated.
error: command 'gcc' failed with exit status 1

Change History (5)

comment:1 Changed 14 months ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0

comment:2 Changed 3 months ago by pkienzle

Should be fixed… code now has a test for PY_MAJOR_VERSION < 3, and emulates the capsule interface.

comment:3 Changed 3 months ago by butler

Should we close the ticket then?

comment:4 Changed 3 months ago by pkienzle

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 5 weeks ago by butler

  • Milestone changed from SasView 4.3.0 to SasView 4.2.0

This was fixed in 4.2.0. Moving this closed ticket.

Note: See TracTickets for help on using tickets.