With UBUNTU  ~/bin is first before the rest.
With Fedora     ~/bin is after the entries (echo $PATH)

 

Regards  
 Leslie
 Mr. Leslie Satenstein
50 years in Information Technology and going strong.
Yesterday was a good day, today is a better day,
and tomorrow will be even better.
 
mailto:[email protected]
alternative: [email protected] 
www.itbms.biz  www.eclipseguard.com
 

--- On Tue, 10/30/12, Stephen Benoit (Linux) <[email protected]> wrote:

From: Stephen Benoit (Linux) <[email protected]>
Subject: Re: [MLUG] Further to previous email about segmentation error
To: "Montreal Linux Users Group" <[email protected]>
Date: Tuesday, October 30, 2012, 1:50 PM

> You should, however, verify that you're running the right program.  Eg
if it's 'myprog', after moving it to ~/bin or wherever, verify that
'which myprog' returns ~/bin/myprog.

Seconded: check the $PATH.  If that does not help, I suggest eliminating
linked libraries as possible cause.

A quick checklist:
 - Linked libraries: are they the same?
   $ ldd ~/bin/myprog
   $ ldd ~/src/myprog

 - Are you using a debugging library like electric fence that may cause
   segfaults (on purpose)?

 - Do you have any environment variables affecting the loader (man ld.so)?
   $ printenv | grep 'LD_'

 - Are the C programs called from within a shell script that calls the
   C programs in a manner *different* than your test from the command line?

 - I suggest using strace to capture the segfault and see what the
   program (and its calling script?) were doing at that moment.
   $ strace -o /tmp/mylog.txt -s 4096 -f ~/mypath/myprog

Best regards,

Stephen Benoit
[email protected]

>
>
> On Tue, 30 Oct 2012, Leslie S Satenstein
> wrote:
>
>> If I create a calling script       and put the program name as a line
in the
>> script, there is no segmentation error.
>>
>> Compiler is gcc 4.7
>>
>>
>> Regards
>>
>>  Leslie




_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to