LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Closed Thread
  Search this Thread
Old 08-29-2006, 12:05 AM   #1
angandas
LQ Newbie
 
Registered: Oct 2005
Location: Minneapolis
Posts: 2

Rep: Reputation: 0
LD_ASSUME_KERNEL - How to swap between 2 values?


Hi All,

I have tried out all possible ways (kudos to google) to solve my problem but am unsuccessful at the end of the day. I seek your help.

I am running a C++ program which calls Matlab and HSpice (a circuit simulation program) through the 'system' commands inside the program. The versions are:
Linux : 2.6.15-26-386 (Ubuntu 6.06)
Matlab: 7.0.0 (R14)
C++ compiler: g++

Since I have a windows version of Hspice, I have installed 'wine' (version: 0.9.19) through the Synaptic Package manager. To test if it runs fine or not, when I run ($ wine hspice.exe) at the command prompt, it runs perfect.

Now, regarding Matlab, I need to do symbolic analysis. On getting errors, I saw that I need to change the variable LD_ASSUME_KERNEL ($ export LD_ASSUME_KERNEL=2.4.1) in the same shell where I invoke Matlab. Then Matlab runs fine. But when I run hspice again from the same shell (terminal), then it fails. Changing back to LD_ASSUME_KERNEL=2.6 makes hspice run smoothly (as before), but screws up matlab.

How do I switch between the two values of LD_ASSUME_KERNEL? I can do it manually on the command prompt before invoking the tools individually, but as you understand, I cannot do it (inside my program) while executing (the program has a loop calling matlab and hspice alternatively).

Two of the things I have tried are:

1) Inside my program,
system("export LD_ASSUME_KERNEL=2.6 && wine hspice.exe");........
system("export LD_ASSUME_KERNEL=2.4.1 && matlab);.......
2) Tried by doing the same thing in .alias file for the two commands.
In the .bash_aliases file,
alias command_1='export LD_ASSUME_KERNEL=2.6 && wine hspice.exe'
alias command_2='export LD_ASSUME_KERNEL=2.4.1 && matlab'
Inside the program,
system("command_1");....
system("command_2);..

They were of no use. Might be one cannot change the LD_ASSUME_KERNEL in runtime.

I eagerly look forward to your help in this regard.

P.S. :
1) The error in 'wine hspice' with LD_ASSUME_KERNEL=2.4.1 was:
..."wine: Unhandled page fault on write access to"......
2) The error in 'matlab' with LD_ASSUME_KERNEL=2.6 was:
..."Unable to load mex file: $Matlab7/toolbox/symbolic/maplemex.mexglx".....

Thanks,
Angan
 
Old 08-29-2006, 02:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...d.php?t=478301.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LD_ASSUME_KERNEL setting ptreves Linux - Newbie 2 08-28-2007 02:19 PM
LD_ASSUME_KERNEL - How to swap between 2 values? angandas Linux - Software 1 08-29-2006 06:20 AM
How can I set LD_ASSUME_KERNEL under LFS? happy_maoron Linux From Scratch 1 11-02-2005 10:06 PM
export LD_ASSUME_KERNEL=2.2.5?? ksoma Linux - Newbie 2 09-21-2003 04:06 PM
how to set LD_ASSUME_KERNEL=2.2.5 monib Linux - Newbie 1 09-23-2001 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration