Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Compile 32-bit programs on cDAQ Linux RT

Solved!
Go to solution

I have a cDAQ (NI-9134) running NI Linux RT.

 

I am unable to get it compile 32-bit programs. The steps that I have done were:

1. Used "opkg" to install all the "gcc", "cpp", "gcc-symlinks", etc - whatever that I could see related to compilers.

2. export CFLAGS='-m32', export CXXFLAGS='m32', export LDFLAGS='m32'

3. CFLAGS='-m32' ./configure

 

 

However only 64-bit binaries are generated.

 

I am unable to find through "opkg" any packages related to 32-bit builds or anything related to "multilib". Could someone please let me know how to make NI Linux RT generate 32-bit binaries?

0 Kudos
Message 1 of 4
(4,180 Views)

We only provide 64-bit support on NI Linux RT for x64 targets. Can you elaborate on why you need to build a 32-bit binary?

0 Kudos
Message 2 of 4
(4,170 Views)

I need to make a 32-bit binary because I am attempting to use the HDF5 library. There is no HDF5 library for NI-9134 NI Linux RT therefore I have to compile its source code. Since I could only use LabVIEW 32-bit (i.e. LabVIEW 64-bit does not have support for a lot of modules I need), I need to compile the HDF5 library to 32-bit binary so that LabVIEW could use it.

0 Kudos
Message 3 of 4
(4,159 Views)
Solution
Accepted by topic author Dereklkp

It sounds like you are saying that you need a 32-bit library to work with 32-bit LabVIEW. However, LabVIEW on your cDAQ target is 64-bit, like all software on our Linux RT Atom-based targets (the ARM-based targets are 32-bit). So, if you want your HDF5 library to run on the 64-bit cDAQ target, you should use a 64-bit build of HDF5. This is true even if you are connecting/deploying to the target from a 32-bit version of LabVIEW.

 

Of course, if you want to run HDF5 on a 32-bit system, such as a LabVIEW RT target with a 32-bit ARM processor, or older LabVIEW RT targets that use VxWorks or Phar Lap instead of Linux, or a 32-bit desktop machine running Windows or any other OS, you will need a 32-bit version of HDF5. But I would not recommend trying to build HDF5 for those environments from your cDAQ. I would only recommend compiling natively on the cDAQ, if you do it at all (*), for code you intend to run on the cDAQ.

 

(*) You may be aware of this already, but you can cross-compile your HDF5 library using Eclipse, i.e. http://www.ni.com/download/labview-real-time-module-2014/4846/en/ -- some people prefer this to compiling on the target, which is somewhat resource-constrained.

Message 4 of 4
(4,133 Views)