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

Windows build fails if 64 bit python is installed #1900

Closed
MikeElkins-TRI opened this issue Mar 21, 2016 · 14 comments
Closed

Windows build fails if 64 bit python is installed #1900

MikeElkins-TRI opened this issue Mar 21, 2016 · 14 comments
Assignees

Comments

@MikeElkins-TRI
Copy link
Contributor

If one follows the build directions on a machine with 64 bit python 2.7 installed, the build will eventually fail in the lcm directory, with unresolved glib externals (g_ptr_array_new is the first one mentioned, for people searching issue text).

This is due to the lcm-python wrapper being compiled (correctly) for 64 bits to match the python, but gtk (which includes glib) doesn't build, it unpacks a zip file of pre-compiled, 32 bit binaries, for reasons unknown to this author.

This could be fixed by not precompiling gtk, or including both 32 and 64 bit binaries, or not compiling lcm-python if the python is 64 bit, or by just adding documentation to the build instructions warning of the incompatibility, in approximate order of desirability.

@billhoffman
Copy link
Contributor

@jhoare I thought we addressed this already.

@jhoare
Copy link

jhoare commented Mar 21, 2016

I think this is related but somewhat different, if I'm reading this correctly, it looks like 64 bit python is installed, but Mike is trying to build the drake as 32bit. Is this correct?

@MikeElkins-TRI
Copy link
Contributor Author

The bit-ness of drake doesn't matter, I've tried both.

On Mon, Mar 21, 2016 at 12:18 PM, John Hoare [email protected]
wrote:

I think this is related but somewhat different, if I'm reading this
correctly, it looks like 64 bit python is installed, but Mike is trying to
build the drake as 32bit. Is this correct?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1900 (comment)

@billhoffman
Copy link
Contributor

No that is not correct. The problem is gtk is 32 bit even for 64 bit. I thought that was fixed.

@jhoare
Copy link

jhoare commented Mar 21, 2016

32bit gtk is downloaded even when you're building in 64bit mode?

When building 64 bit are you setting CMAKE_FLAGS to -G "Visual Studio 14 2015 Win64" like in: http://drake002.csail.mit.edu/drake/sphinx/windows.html

@jhoare
Copy link

jhoare commented Mar 21, 2016

There used to be a bug that 32bit gtk was always installed but that should be fixed.

The check is here: https://github.com/RobotLocomotion/gtk-pod/blob/master/CMakeLists.txt#L19

@MikeElkins-TRI
Copy link
Contributor Author

CMAKE_FLAGS: No I hadn't done that (as it is in a part labeled "If you have
Matlab 64bit"), but I had selected the 64 bit compiler when asked during
"make options", which I assume has the same effect.

Building on my machine with 64 bit python:
file="C:/Users/Elk/drake-distro/externals/gtk/pod-build/gtk3-prefix/src/gtk+-bundle_3.6.4-20130921_win32.zip

On Mon, Mar 21, 2016 at 12:40 PM, John Hoare [email protected]
wrote:

There used to be a bug that 32bit gtk was always installed but that should
be fixed.

The check is here:
https://github.com/RobotLocomotion/gtk-pod/blob/master/CMakeLists.txt#L19


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1900 (comment)

@jhoare
Copy link

jhoare commented Mar 21, 2016

Actually selecting the 64 bit compiler during make options will not be the same since some pods only get the information that they are building for 64 bit via that environment variable, and make options does not export that environment variable.

See here: #1843 (comment)

Although I wonder if there as still a separate issue of having 64bit python and a 32bit build?

@jhoare
Copy link

jhoare commented Mar 21, 2016

I was able to successfully build drake with a 64 bit python when I had the environment variable set.

When attempting to build 32bit, I got linker errors as you described.

It looks like lcm's CMakeLists.txt should be updated to check that the architecture is equal to what version it is attempting to build. Right now it appears to only let it through if it is 64bit.
https://github.com/RobotLocomotion/lcm-pod/blob/cmake/lcm/lcm-src/CMakeLists.txt#L62

@MikeElkins-TRI
Copy link
Contributor Author

Should the environment variable be set for all windows users, or only users
using Matlab64 bit OR python 64 bit?

On Mon, Mar 21, 2016 at 2:20 PM, John Hoare [email protected]
wrote:

I was able to successfully build drake with a 64 bit python when I had the
environment variable set.

When attempting to build 32bit, I got linker errors as you described.

It looks like lcm's CMakeLists.txt should be updated to check that the
architecture is equal to what version it is attempting to build. Right now
it appears to only let it through if it is 64bit.

https://github.com/RobotLocomotion/lcm-pod/blob/cmake/lcm/lcm-src/CMakeLists.txt#L62


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1900 (comment)

@MikeElkins-TRI
Copy link
Contributor Author

I confirm that python64 build succeeds with CMAKE_FLAGS set to 64 bit.

Should we change the windows build instructions, or make it fail more
loudly in this situation?

On Mon, Mar 21, 2016 at 2:33 PM, Mike Elkins [email protected] wrote:

Should the environment variable be set for all windows users, or only
users using Matlab64 bit OR python 64 bit?

On Mon, Mar 21, 2016 at 2:20 PM, John Hoare [email protected]
wrote:

I was able to successfully build drake with a 64 bit python when I had
the environment variable set.

When attempting to build 32bit, I got linker errors as you described.

It looks like lcm's CMakeLists.txt should be updated to check that the
architecture is equal to what version it is attempting to build. Right now
it appears to only let it through if it is 64bit.

https://github.com/RobotLocomotion/lcm-pod/blob/cmake/lcm/lcm-src/CMakeLists.txt#L62


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1900 (comment)

@jhoare
Copy link

jhoare commented Mar 21, 2016

RobotLocomotion/lcm-pod#18 and #1903 for the python checking in lcm.

@billhoffman
Copy link
Contributor

For now I guess we should update the build instructions. I think there might be a way to pass the -G flag to the make pods by adding a make CMAKE_FLAGS="-G "${CMAKE_GENERATOR}" to the make call.

@jhoare
Copy link

jhoare commented Mar 22, 2016

Agreed, #1909 can be used to track the requirement of CMAKE_FLAGS environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants