Tuesday, February 24, 2009

C/C++ executable running from Cadence with interprocess communication

When starting application I get this error:

==========
Error: Can't Start VisualDRC CORE

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6)
==========

When analyzing those libs I get the below:

[gvit@alfa]<~/work> 202 # ldd -v /usr/lib/libstdc++.so.6
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib/libm.so.6 (0xb7e5d000)
libc.so.6 => /lib/libc.so.6 (0xb7d01000)
/lib/ld-linux.so.2 (0xb7f9a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ce2000)

Version information:
/usr/lib/libstdc++.so.6:
libm.so.6 (GLIBC_2.0) => /lib/libm.so.6
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
libgcc_s.so.1 (GCC_4.2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GLIBC_2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.3) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.0) => /lib/libgcc_s.so.1
libc.so.6 (GLIBC_2.3.2) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
/lib/libm.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
/lib/libgcc_s.so.1:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2.4) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
----------------------------

[gvit@alfa]<~/work> 204 # strings /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0

and the system /libgcc_c.so.1 show:

[gvit@alfa]<~/work> 205 # strings /lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0
GCC_3.3
GCC_3.3.1
GCC_3.4
GCC_3.4.2
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.4.0

TEMPORARY SOLUTION:


1. The old libgcc_s.so.1 from the Cadence library can be linked to the system library.
linux# cd cadence_install_dir/tools/lib

2. Backup the Cadence libgcc_s.so.1
linux# mv libgcc_s.so.1 libgcc_s.so.1.bkp

3. Make symlink to the libgcc_s.1 from the system /lib directory
linux# ln -s /lib/libgcc_s.so.1 libgcc_s.so.1

P.S.: Need further solution

EASY SOLUTION (less modifications and not correct!)

- in .cdsinit file set this
;---
;overwriting LD_LIBRARY_PATH
printf("Old settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
printf("Overwriting LD_LIBRARY_PATH ...\n")
setShellEnvVar("LD_LIBRARY_PATH=/lib")
printf("New settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
;---

FINAL SOLUTION (the correct solution! yes!)

P.S.: solved after I read this: all about LD_LIBRARY_PATH

1. I made a script that call the C/C++ executable:
linux# cat > VisualDRC
#now input the below
#!/bin/sh
export LD_LIBRARY_PATH=/lib
exec ${VDRC_HOME_DIR}/bin/VisualDRC.exe $@

linux# chmod a+x VisualDRC

Enjoy, this is the correct solution

Cadence IC5141_usr6 install solution

Hi my friend :)

When trying to install from ../CDROM1/SETUP.SH I get this error message:
---------------
/bin/tar: Removing leading `/' from member names

Could not set up SoftLoad ../install_path
---------------
Solution:

- edit the SETUP.SH and add for all "tar xf" => "tar xfP" with "P" option

P.S.: if you have the errors below then look for this solution

/bin/tar: -b1: Not found in archive
/bin/tar: Error exit delayed from previous errors
/bin/tar: -b1: Not found in archive
/bin/tar: Error exit delayed from previous errors

To aviod another error, remove the leading (-) from the tar -xfP => (tar xfP)

Friday, February 20, 2009

Cadence cdsdoc problem and solution in OpenSuse 11.1

Hi there
===========
1.First of all I try to run "cdsdoc -test" from a terminal and get this message:

[gvit@ws09]<~> 210 # cdsdoc -test

CDSDoc 2.1 Installation verification

Check system - Linux ws09 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux
Checking installation directory... Done.
Checking user environment variables... Done.
Checking Netscape, make sure Netscape 4.51 (or higher) is in your PATH ...

--- Warning: Netscape NOT found ---

Checking Directory Structure...
Directory Structure Check passed
Done.

================
2. This I solved such way:
- login as root
- make a file "netscape" in "/usr/bin"
- write these lines below and save file:
*****
#!/bin/sh
exec firefox $@
*****
- change permision of "netscape" to all executable:
chmod a+x /usr/bin/netscape
===============
3. Now run "cdsdoc -test" should look like this:
[gvit@ws09]<~> 207 # cdsdoc -test

CDSDoc 2.1 Installation verification

Check system - Linux ws09 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux
Checking installation directory... Done.
Checking user environment variables... Done.
Checking Netscape, make sure Netscape 4.51 (or higher) is in your PATH ...
Mozilla Firefox 3.0.6, Copyright (c) 1998 - 2009 mozilla.org
Checking Directory Structure...
Directory Structure Check passed
Done.
==============
4. Running command "cdsdoc &" and clicking "Search" button can show this error:
[gvit@ws09]<~> 209 # CDSDoc, version 2.1
Copyright © 2000-2003, Cadence Design Systems, Inc.
Starting browser ...
./https: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
================
5. You can solve this such way:
- login as root
- type command "zypper install compat"


Now everything should be ok
All the best ;)

Wednesday, February 18, 2009

Monday, February 16, 2009

Acer Aspire One 150 bb resolution change in OpenSuse 11.1

Initially had a few problem with setting up native resolution in my Suse. When testing a new setting through sax everything was fine, but after restarting X, system was defaulting into 640x480 with only top left part of the screen visible. So my redemption was as follow:
1. running following command:
Quote:
~> gtf 1024 600 60

gives you modeline settings for your screen:
Quote:
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
Modeline "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync

P.S.: I modified the line a little such way:
Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
You can see, I removed frequency 60.00

2. copy above into your xorg.conf, which can be found in /etc/X11/:
Quote:
Section "Modes"
Identifier "Modes[0]"
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
Modeline "1024x600" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
EndSection

3. Start YaST and navigate to System / "etc/sysconfig editor".
Then Desktop/Display Manager/DISPLAYMANAGER_RANDR_MODE_auto and replace the default settings with:
1024x600_60 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
Alternatively you can manually edit it directly in: /etc/sysconfig/displaymanager

4. Restart your X (or reboot)

Enjoy :)

Friday, February 13, 2009

how to check all IP's and Mac's from network

Hi there,
I use in Linux and windows command "arp -a" for this.


how to check ports on LAN network (aslo WAN)

Good afternoon, Mr. or Miss.

To check if a port is open in linux I use "nmap":
Example:

linux# nmap -v your_ip -p your_port

or

linux# nmap -v your_ip

for more options use "man nmap"
================
In windows I use command "netstat"

Example:

C:>netstat -tl

or

C:>netstat -tln

Try them, they are very useful for a network hacker

Tuesday, February 10, 2009

mp-202 Voice IP in OpenSuse 11.0

The main task was to open tcp and udp (specific Voice IP provider settings) in OpenSuse 11.0 server firewall.

To do that, open in terminal as "root"
linux# yast2
Then go to Security and Users->Firewall
Switch to Expert Mode and go to Custom Rules.
Click "Add" buton and input the needed settings:
Source Network: 0/0 (this mean from all IP)
Protocol: Tcp or Udp
Destination Port: xx...
Source Port: xx...

Go to "Start-up" and click "Save Settings and Restart Firewall Now"
That's all, enjoy :)

File transfer via SSH

SSH allows the use of pipelines controls, and use inputs / outputs pipes as any other commands , on the basis that redirection is done to or from the remote machine.

This may be used to transfer files:

ssh server "cat remote_file" > local_file


The fact that the scp command does exactly the same thing, the usefulness of such a command is questionable,
but imagine that you need to transfer a file of several mega, using a fairly limited bandwidth:

ssh server "gzip -c remote_file" > local_file.gz


Here, the server compress the file, the command used will write the compressed file on the client machine.

It can go even further if you do not want to retrieve a gzipped file, but still want to lower bandwidth usage:
ssh server "gzip -c remote_file " |gunzip > local_file


=======

Using this method effectively sends the compressed tarball to the terminal. You then pipe that into an ssh session which is running the extract version of the previous tar function along with the change directory argument. This, essentially, sends the compressed tarball into a decompression process at the other end over a secure ssh "pipe".

The result is a pretty quick file transfer which - as the data is being sent in a compressed GZIP form (of BZip2 if you replace the z with a j in the tar functions) you save on bandwidth too.

Here an an example of how to do this, assuming you are in (for example) /var/www/html/ and the website you want to transfer is the folder www.example.com.

tar czf - www.example.com/ | ssh joebloggs@otherserver.com tar xzf - -C ~/

This will send the entire www.example.com folder over to the home folder on your target server in compressed form over and encrypted connection.
================================
CONCLUZION:

1. - to get from server directory or file
ssh username@from_server "tar czf - directory_to_get" | tar xvzf - -C path_where_to_put

2. - to send directory to another host
tar czf - directory_to_send | ssh username@to_server "tar xzf - -C path_where_to_put"

Enjoy :*

Monday, February 9, 2009

multiple ip in linux

in linux (maybe in windows to) we can add multiple IP, and what is interesting, that one can be achieved by dhcp and another set static by adding an alias with static ip, and this all for one NIC.

in OpenSuse look in /etc/sysconfig/network/... for all configurations files of ifcfg-eth* (where * may be 0, 1, etc) also look here in file "routes"

how to add multiple gateway's in linux

I saw in windows we can add more gateways the same can we do in linux with command:

linux# route add -net 0.0.0.0/0 gw your_gateway_ip

we can check our routing table with command:
linux# route -n
or
linux# ip route sh

in OpenSuse 11.0 you can read about command "insserv", that is very useful when you want to make a script that is loaded at boot time

OpenSuse 11.0 Example:
---
Make file
linux# vi /etc/init.d/gateway

add there:
#!/bin/sh
route add -net 0.0.0.0/0 gw your_gateway_ip
-- save and close the file

and do also
linux# chmod a+x /etc/init.d/gateway

After that make it to start at boot time: (we cannot put it in /etc/init.d/boot.local because the NIC's aren't up)
linux# insserv -v -d /etc/init.d/gateway

For more details look in documentation.