Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVOPS-141 Prevent symbol preemption of c++ references to static stdc++ #1039

Merged

Conversation

vitaly-krugl
Copy link
Member

@vitaly-krugl vitaly-krugl commented Aug 14, 2016

Fixes #1040

The manylinux wheel build of this PR passes all nupic.core and nupic tests (unit, integration, swarming) on Ubuntu 16.04 !!!

Use shared libgcc and static libstdc++ on linux python extension builds.

Apply an export map to OS X, Linux, and MINGW builds of nupic.bindings shared objects.

Refactor extension build steps into a function shared by algorithms, math, engine_internal, etc. in preparation for adding export maps.

…math, engine_internal, etc. in preparation for adding export maps.
@numenta-ci
Copy link

By analyzing the blame information on this pull request, we identified @scottpurdy, @oxtopus and @rcrowder to be potential reviewers

…pic.bindings shared objects.

Use shared libgcc and static libstdc++ for builds of python.bindings python extension shared objects on Linux.
@vitaly-krugl vitaly-krugl force-pushed the devops141-stdcpp-abi-manylinux branch from 61d682d to affa66e Compare August 14, 2016 09:28
@@ -671,7 +671,7 @@ if (${NUPIC_BUILD_PYEXT_MODULES})
set(CMAKE_SWIG_FLAGS ${src_swig_flags} ${CMAKE_SWIG_FLAGS})

# Set up linker flags for python extension shared libraries
set(src_swig_extension_link_flags "${PYEXT_LINKER_FLAGS_OPTIMIZED}")
set(_SRC_SWIG_EXTENSION_LINK_FLAGS "${PYEXT_LINKER_FLAGS_OPTIMIZED}")
Copy link
Member Author

@vitaly-krugl vitaly-krugl Aug 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will soon have to bite the bullet and switch "private globals" to leading underscore plus all caps. Having them in lowercase is confusing when you use them inside a function, which itself uses lower-case property names locally.

Here, I started changing the few of the private module-global properties that I needed inside functions to all-caps for code readability.

@vitaly-krugl vitaly-krugl changed the title DEVOPS-141 DO NOT MERGE Prevent symbol preemption of c++ references to stdc++ DEVOPS-141 Prevent symbol preemption of c++ references to static stdc++ Aug 14, 2016
@vitaly-krugl
Copy link
Member Author

Ready for code review

CC @scottpurdy

@scottpurdy
Copy link
Contributor

👍

message(STATUS "src_swig_extension_link_flags= ${src_swig_extension_link_flags}")
message(STATUS "_SRC_SWIG_EXTRA_DEPS = ${_SRC_SWIG_EXTRA_DEPS}")
message(STATUS "_SRC_SWIG_LINK_LIBRARIES = ${_SRC_SWIG_LINK_LIBRARIES}")
message(STATUS "_SRC_SWIG_EXTENSION_LINK_FLAGS= ${_SRC_SWIG_EXTENSION_LINK_FLAGS}")
message(STATUS "CMAKE_SWIG_FLAGS = ${CMAKE_SWIG_FLAGS}")


function(PREPEND_BOILERPLATE_TO_PYTHON_PROXY_MODULE
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottpurdy, I added this function in an earlier PR. The other day, I got a response to my question on the Swig mailing list about %pythonbegin that looks like could be used to accomplish the same feat. I filed issue #1043 as a reminder to follow up.

@vitaly-krugl
Copy link
Member Author

Thanks, @scottpurdy !

@vitaly-krugl vitaly-krugl merged commit b368352 into numenta:master Aug 16, 2016
@vitaly-krugl vitaly-krugl deleted the devops141-stdcpp-abi-manylinux branch August 16, 2016 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants