Installing LCM on WIndows

1,009 views
Skip to first unread message

Albert Thomas

unread,
Dec 30, 2015, 5:34:38 PM12/30/15
to Lightweight Communications and Marshalling
Hi,

I have installed LCM in Mac as well us Ubuntu and it is running fine :-) 

Now I am trying to install LCM on windows and following the below webpage for getting the dependencies (GLib (Run-time, dev, gettext-runtime (Run-time)). 


I am struck at one point. Rather I should say I am not understanding clearly what to do with respect to this particular step. This step says that 

  • Create a PKGBUILD file as you would do for Arch Linux for the package you would like to build for windows. You can find the gedit one here. Or you can find more information on how to create this file on the Arch Linux wiki.
I downloaded the PKGBUILD.txt file from the above link and I assume that I need to put this in some folder and run the next statement makepkg-mingw -sL from the terminal.  I tried putting in msys64/home/<username> and tried building ( I used msys installer for getting the GTK+). But this is not working out. 

Any suggestion will be of great help. Thank you very much

Albert Thomas  

Alexander Szakaly

unread,
Dec 31, 2015, 6:34:13 AM12/31/15
to lcm-...@googlegroups.com
What type of build are you attempting. Building with visual studio or msys? Which version?
For Visual Studio at least you just need to grab the prebuilt binaries of the dependencies... google will find them for you. :-)

BR
/Alex
--
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 https://groups.google.com/group/lcm-users.
For more options, visit https://groups.google.com/d/optout.

Albert Thomas

unread,
Jan 1, 2016, 5:25:56 PM1/1/16
to Lightweight Communications and Marshalling
Hi Alex,

Thank for the reply. I am planning to build the LCM by using Visual Studio ( I have 2013 and 2012 installed) which I am yet to do.

I understand that one of the pre requisite for doing this is to get GLib and gettext-runtime. For that, as suggested in the build instructions I went to the website http://www.gtk.org and trying to get gtk+ bundle. Using msys installer and based on this website (https://blogs.gnome.org/nacho/2014/08/01/how-to-build-your-gtk-application-on-windows/) I am trying to get the gtk+ installed and got struck in that process as mentioned in my previous thread.

I am kind of new to this process and I think I am making some silly mistake.

Many thanks for your reply and hope we will be able to solve this out.

Thanks
Albert

Albert Huang

unread,
Jan 3, 2016, 11:07:05 PM1/3/16
to lcm-...@googlegroups.com
Hi Albert,

The GTK+ windows instructions are in an unfortunate state right now and I wouldn't recommend following them. Alex posted a link a few months ago to the direct binary download page:



I recommend avoiding the MSYS stuff for now.

Best,
Albert

Albert Thomas

unread,
Jan 12, 2016, 2:17:39 PM1/12/16
to Lightweight Communications and Marshalling
Hi Albert,

Finally I have build the LCM.sln file in Visual Studio. Thanks for your help. I got Visual studio 2013 and it worked with some minor edits in the paths.

Now when I am trying to run the tests I am getting this following error. Anybody got this error before? Thanks in advance.

C:\Albert\lcm-1.3.0\test>python run_unit_tests.py
Running Python unit tests
Running C unit tests
'c\memq_test' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "run_unit_tests.py", line 83, in <module>
    sys.exit(main())
  File "run_unit_tests.py", line 79, in main
    run_tests()
  File "run_unit_tests.py", line 28, in run_tests
    run_gtest(os.path.join("c", "memq_test"))
  File "run_unit_tests.py", line 14, in run_gtest
    (name, xml_fname), shell=True)
  File "C:\Users\albertth\AppData\Local\Continuum\Anaconda\lib\subprocess.py",
ine 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'c\memq_test --gtest_output=xml:lcm_unit
est/c_memq_test.xml' returned non-zero exit status 1

Albert Huang

unread,
Jan 13, 2016, 1:53:36 AM1/13/16
to lcm-...@googlegroups.com
Hi Albert,

I'm not sure the unit tests work in Windows, unfortunately. I originally wrote them for Linux and OS/X but haven't gotten around to making them work in Windows.

Albert

Albert Thomas

unread,
Jan 13, 2016, 2:43:02 PM1/13/16
to Lightweight Communications and Marshalling
Ok. Thanks Albert for letting me know about this.

So once you successfully build the LCM.sln, the LCM is setup completely like Linux and Mac? Could you let me know whether any additional steps are required. 

For running the first example, I tired creating a typedef by using the statement lcm-gen -p example_t.lcm. But it says, lcm-gen command not found

So I assume I will have to do some additional steps. Not able to make out clearly from the README text file.

Thanks
Albert

Albert Huang

unread,
Jan 18, 2016, 5:32:33 PM1/18/16
to lcm-...@googlegroups.com
Hi Albert,

The Linux and Mac installation puts the libraries and binaries in the system path. LCM doesn't have a Windows installer, so when you do a VS build everything gets built to a subdirectory of the source directory. The Windows build is geared more towards developers who plan on integrating the LCM binaries directly into their application. So in that sense it's doesn't have the typical development features that you'd typically find with an SDK and you may need to do a bit more work to glue the pieces together into your system. Unfortunately I don't have much more detailed advice than this as I don't use the Windows port myself.

Regards,
Albert
Reply all
Reply to author
Forward
0 new messages