[VS2013 Pro] VS-build being maintained?

320 views
Skip to first unread message

alexande...@gmail.com

unread,
Sep 10, 2015, 10:59:59 AM9/10/15
to Lightweight Communications and Marshalling
Hi,
I've been building LCM both master and v1.2.1 with VS2013 Pro.
The project files need some tweaking to make it build properly (some import library incorrectly named and clashing intermediate directories and similar).

Is the VS build being maintained?
Because otherwise I could probably contribute with that.
Also there is no VS build for the c and cpp tests and I'd rather be able to run the tests before deploying the build.
Is that also something that would be of interest?

Best regards,
// Alex

Albert Huang

unread,
Sep 10, 2015, 1:16:48 PM9/10/15
to lcm-...@googlegroups.com
Hi Alex,

Helping maintain the VS build files and integrating the C/C++ tests would be great! I haven't used VS in a while, but the main thing I would ask is to try and make the build files work for as many VS users as possible. I'm not sure of how backwards-compatible VS generally is, which is why so far I've kept the .sln ad .vcproj files at VS2008. That's probably unnecessary at this point, as I'm guessing most VS users have moved to a newer version like you have.

Albert

--
You received this message because you are subscribed to the Google Groups "Lightweight Communications and Marshalling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lcm-users+...@googlegroups.com.
To post to this group, send email to lcm-...@googlegroups.com.
Visit this group at http://groups.google.com/group/lcm-users.
For more options, visit https://groups.google.com/d/optout.

Alexander Szakaly

unread,
Sep 11, 2015, 2:16:42 AM9/11/15
to lcm-...@googlegroups.com
Great! I'll get right on it.

Yes, compatibility is an issue with VS. The files are not backwards compatible to older VS, but the even bigger problem is that they aren't really guaranteed to be forward compatible either. It really depends on how correct/clean the original project files are and the structure in VS makes it really easy to mess up (some configuration inconsistencies work in older versions but stop working in newer etc.).

The problems I've been having with building in in VS2013 are also due to these kind of problems.

So I propose the following:
1. As a first step I create a new VS build in WinSpecific/vs12 so everything existing is unaffected. I also integrate the build of the tests in this. When that's done the project files will be much cleaner.

2. Since the new files are cleaner I can attempt to port the changes back to the vs9-format. And verify that they upgrade correctly to newer formats. I'll also move the files into WinSpecific/vs9 since that will make it easier to maintain. It seems to be possible to download VS2008 from microsoft so I might be able to verify that everything works in VS2008. If not maybe someone can verify it for me.

3. If the above is successful WinSpecific\vs12 can be removed.

Sounds good?

// Alex

Russ Tedrake

unread,
Sep 11, 2015, 5:18:34 AM9/11/15
to lcm-...@googlegroups.com
Fwiw - VS is now freely available (since v2013), so for my project we've decided to limit backwards support.  (We want to be able to rely on c++11).

Also fwiw - i went through a little while back (v1.0.0)  and redid the lcm build system using cmake instead of autoconf.  That let's us generate VS project files and buildi successfully from the command line (as a POD) on windows as well as maintaining all the original functionality on mac/linux.  In my view it's much cleaner.  It's on the cmake branch at http://github.com/RobotLocomotion/lcm-pod 

Since I'm emailing: the other build system related note is that we're not actually able to run with the latest lcm branch right now on even the mac/linux build servers because (i believe) that the current makefiles have a race condition in them that causes the build to fail with high probability on parallel builds with lots of cores.  The cmake version seems  ok.

- Russ

alexande...@gmail.com

unread,
Sep 11, 2015, 6:56:54 AM9/11/15
to Lightweight Communications and Marshalling
Yeah, I would prefer cmake also. But I needed something fast so I thought I just update the part that wasn't working for me. Migrating to cmake would be a better long term solution in my mind.

Based on what you write I should not need to port the changes back to VS2008, right? That would mean less work for me so fine. Is there any particular reason that the cmake build system in your branch hasn't been merged back to lcm? Sure it is for an older version but shouldn't be much work to update...

// Alex

Russ Tedrake

unread,
Sep 11, 2015, 7:39:20 AM9/11/15
to lcm-...@googlegroups.com
Only for lack of time.  We implemented c/c++/java and python, but I’ve not looked at lua nor c# (I don’t think they’d be hard).  Also wanted to make sure that the maintainers were interested in going this way.  

One other note: just tried building with VS 2015 the other day and ran into a new minor inttypes issue (VS 2013 was fine).  I was planning to try to fix that this weekend, but would be thrilled if someone beat me to it.

- Russ

Albert Huang

unread,
Sep 11, 2015, 12:21:25 PM9/11/15
to lcm-...@googlegroups.com
Migrating to cmake sounds like a great idea to me. If someone is willing to lead the charge on that, I'd be in full support.

And yes, it does sound like we can drop support for VS 2008.

Albert

Abe Bachrach

unread,
Sep 11, 2015, 6:17:28 PM9/11/15
to lcm-...@googlegroups.com
+1

alexande...@gmail.com

unread,
Sep 14, 2015, 12:02:38 PM9/14/15
to Lightweight Communications and Marshalling
I have now created a visual studio 2013 solution that includes the tests. Found a couple things that needed to be updated to make the tests work correctly in Windows.
There is a pull request now containing these changes that has been tested on Windows and Ubuntu.
I have left the current VS2008-build intact. Let me know if you want me to remove it and update the pull request.
I think this is a decent interim solution until cmake support is in place. I can probably pitch in on the cmake support eventually unless someone beats me to it...

// Alexander

Edwin Olson

unread,
Sep 15, 2015, 6:12:39 PM9/15/15
to lcm-...@googlegroups.com
I often wish I'd fought harder against using autotools. Is the proposal to replace autoconf and friends with cmake? Or are you proposing some hyper-abomination that uses both?

-Ed
Edwin Olson
Assoc. Professor, Computer Science & Engineering
University of Michigan
http://april.eecs.umich.edu

Albert Huang

unread,
Sep 15, 2015, 6:15:42 PM9/15/15
to lcm-...@googlegroups.com

lol. Yes, the idea would be to replace everything and use only CMake. So if we get a proper CMake-based build system up and running, then we could delete all the autotools and visual studio build files. Thoughts?

Albert

Russ Tedrake

unread,
Sep 15, 2015, 8:01:58 PM9/15/15
to lcm-...@googlegroups.com
Yes - cmake only has been working well for us here.  - Russ

Tim Perkins

unread,
Sep 18, 2015, 7:21:33 PM9/18/15
to lcm-...@googlegroups.com
But I worked so hard to rewrite ax_lua.m4!

Just kidding, CMake is way better. I think there is already a module for Lua built in.

rpkhu...@gmail.com

unread,
Oct 30, 2015, 6:25:15 PM10/30/15
to Lightweight Communications and Marshalling
Hi Alexander, 

I'm trying to us the VS2013 solution that you provided (Thank you for making this!). However, the solution is looking for the files "lcmtest_primitives_t.h", "lcmtest_primitives_list_t.h", "lcmtest_node_t.h", "lcmtest_multidim_array_t.h", "lcmtest2_cross_package_t.h" under ..\..\test\types\lcmtest\lcmtest_primitives_t.c. These files don't appear to exist. Do you know what is going on? 

Thanks!

Alexander Szakaly

unread,
Oct 31, 2015, 6:11:23 AM10/31/15
to lcm-...@googlegroups.com, Lightweight Communications and Marshalling
Hi!

Those .c and .h files are being generated during the build so you should not have them after unpacking the source or building the Clean target.

They should be created by the project lcmtest and lcmtest2. If you look in those projects the .lcm files are added to it as using CustomBuild and the CustomBuild tool is defined in RunLcmGen.props which is assigned to those projects. So If you are missing those files it means the the custom build step was not run for some reason. I guess one of the reasons could be that it was unable to run lcm-gen for some reason (maybe it failed to build or it could not find it). It should though try to build lcm-gen before lcmtest and lcmtest2 since these projects have a set dependency on lcm-gen. Also if the files are missing and you manually build lcmtest and lcmtest2 the files should be created.

So to try to troubleshoot this it would be great if you could provide some additional info.
- How are you trying to build? 
- Through the IDE with "Build Solution" or with msbuild? 
- Do you get the same problem with both?
- Which version of VS2013 are you using? Any servicepacks or similar installed?

Create a build output the following way:
- Make sure the source tree is clean.
- Open LCM.sln in the IDE
- Right click the Solution and "Build solution"
- In the build outputs window select "Build order" (or some similar option to correctly sort the output).

If you could the send that output from the build output window I could have a look at it and maybe better understand what happens.

Best regards,
// Alexander

rpkhu...@gmail.com

unread,
Nov 1, 2015, 4:51:30 PM11/1/15
to Lightweight Communications and Marshalling
Thanks so much for the reply! I'm using Visual Studio Community 2013. The Build Order output is attached with the main errors. I had been building it with the IDE, but when I built it with msbuild, my errors are clearly caused by my glib install. I spent the last several hours trying to fix it with no luck. GTK's link to prebuilt libraries is down: http://www.gtk.org/download-windows.htm. I typically use linux and iOS systems and am having a very difficult time compiling glib using msys, I feel like I keep getting circular errors. Does anyone have the prebuilt libraries? 

Thanks!
buildErrors.txt

alexande...@gmail.com

unread,
Nov 1, 2015, 5:35:49 PM11/1/15
to Lightweight Communications and Marshalling
Based on the output I would think that windows can't find the glib dlls when launching lcm-gen. You can test it yourself by opening a command prompt and cd to the folder with the build lcm-gen.exe.
Run lcm-gen.exe from there and see if it executes.
The fact that it builds means that you probably set up GLIB_PATH correctly and downloaded the libs and headers (contained in glib-dev-xxxx_win32.zip. However you also need to get the dlls which are in a different package called glib_xxxx_win32.zip and add the bin-folder in that package to the system path (windows searches the path for dlls). Just make sure you get the same version of both packages. They can be downloaded for example from here: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/

Make sure you test running lcm-gen.exe manually from the command-line. If that works and the build still fails something else is going on.

Regards,
// Alex

alexande...@gmail.com

unread,
Nov 1, 2015, 5:39:05 PM11/1/15
to Lightweight Communications and Marshalling
BTW, I would really recommend using the prebuilt binaries of glib instead of trying to build it with msys yourself. Building with msys requires some special care if you want the libraries to link correctly with Visual Studio.
//Alex


On Sunday, November 1, 2015 at 10:51:30 PM UTC+1, rpkhu...@gmail.com wrote:

alexande...@gmail.com

unread,
Nov 1, 2015, 5:43:51 PM11/1/15
to Lightweight Communications and Marshalling
Sorry for spamming, just one last note:
The error code returned by cmd.exe in the build output is -1073741515 == 0xC0000135 == STATUS_DLL_NOT_FOUND, so bets are on the missing dll...
// Alex

rpkhu...@gmail.com

unread,
Nov 4, 2015, 3:31:55 PM11/4/15
to Lightweight Communications and Marshalling
That was the problem. LCM is now complied and running! Thanks so much for the help! If possible, I think it would be good to add that information to the windows download instructions because http://www.gtk.org/download/windows.php doesn't host these files anymore.  
Reply all
Reply to author
Forward
0 new messages