Discussion:
segmentation fault with libnipalu
(too old to reply)
RMAR
2006-06-13 16:10:09 UTC
Permalink
I installed Nidaqmx v8.0 on Linux Fedora Core 4.
Everything works and example programs work.

Now i have to integrate a DIO functionality in my software but as I add
-lnidaqmx in the makefile (even with no change in the code),
compilation runs perfectly but I get segmentation fault at execution.
The problem occurs even before the first instruction. Here are debugger messages:

(gdb) run
[Thread debugging using libthread_db enabled]
[New Thread -1208138048 (LWP 14288)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208138048 (LWP 14288)]
0x003ef9f5 in libLoad () from /usr/local/lib/libnipalu.so.1
(gdb)

And here the backtrace:
#7  0x00000000 in ?? ()
#6  0x03f95f32 in ?? () from /usr/local/lib/libnimxpu.so.1
#5  0xbfdec4c8 in ?? ()
#4  0x03fa152c in ?? () from /usr/local/lib/libnimxpu.so.1
#3  0x03fa1720 in ?? () from /usr/local/lib/libnimxpu.so.1
#2  0x03f95f63 in ?? () from /usr/local/lib/libnimxpu.so.1
#1  0x03f9d3fb in nNIMXP100::tCPUCycleCounter::tCPUCycleCounter () from /usr/local/lib/libnimxpu.so.1
#0  0x003ef9f5 in libLoad () from /usr/local/lib/libnipalu.so.1

Does anybody know what's happening?
Thanks,
RMAR
AlessioD
2006-06-14 06:40:14 UTC
Permalink
Hi,
could you just post here the makefile you are using. I want to see if I can reproduce the behaviour over here.AlessioD
RMAR
2006-06-14 07:40:11 UTC
Permalink
Sorry, in previous msg I attached the same file twice..
RMAR
RMAR
2006-06-14 07:40:11 UTC
Permalink
Voilà...
(I renamed as Makefile.txt to be able to post it)
Thanks,
RMAR


Makefile.txt:
http://forums.ni.com/attachments/ni/70/5048/1/Makefile.txt


Makefile1.txt:
http://forums.ni.com/attachments/ni/70/5048/2/Makefile1.txt
AlessioD
2006-06-15 05:40:07 UTC
Permalink
Unfortunately there does not seem to be anything wrong in what you are doing. The situation you stumbled upon may just be an effect of using NI products on a Linux Distribution which is not supported by NI.Here <a href="http://www.ni.com/linux/support.htm#1" target="_blank">http://www.ni.com/linux/support.htm#1</a>&nbsp;you can find the list of supported distributions, as well as other useful information. Keep in mind that even if something is not supported by NI, this does not necessarily mean it won't work. It is simply not guaranteed it wiil work.
Linking the libraries manually&nbsp;is another test you could do.&nbsp;Just some hints on what libraries to look for
-lnidaqmx -lnimercu -lnidmxfu -lnimhwcfu -lnimstsu -lnimdbgu -lniorbu -lnipalu -lnimercu
With this being said, I have been crawling around the forums for similar issues and found the following threads which may help you.
<a href="http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=15833&amp;requireLogin=False" target="_blank">http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=15833&amp;requireLogin=False</a>
<a href="http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=11879&amp;requireLogin=False" target="_blank">http://forums.ni.com/ni/board/message?board.id=250&amp;message.id=11879&amp;requireLogin=False</a>
&nbsp;
RMAR
2006-06-15 08:10:08 UTC
Permalink
Thanks,
Fedora is only a version of RedHat, so I think there shouldn't be any pb for that.
Do you know what libnipalu does (just to have a direction for investigations)?

An hypothesis is a conflit with pthread, since NI libraries create theòselves a thread for each DIO task.
How does it sound to you?
RMAR

Loading...