LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2010, 07:44 AM   #1
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Rep: Reputation: 1
pgplot problem


I want to install pgplot on ubuntu 9.10 but I have some errors
after editing makefile in line 880
replaced "pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h" by
"pndriv.o : /usr/local/include/png.h /usr/local/include/pngconf.h /usr/local/include/zlib.h /usr/local/include/zconf.h"

and running code "make" I get this error :

No rule to make target `/usr/local/include/png.h', needed by `pndriv.o'. Stop.
also I tried to uncomment this line got another error :
make: *** [pndriv.o] Error 1
and also replace "pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h" by "pndrive.o : "
what should I do ?

Last edited by sarahf60; 04-06-2010 at 08:03 AM.
 
Old 04-06-2010, 08:06 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,566

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Well the first question would be why alter the file to not use the locally stored files?

The second would be, the error is obvious and you need to alter other parts of the makefile
to now provide details on how to make/use /usr/local/include/png.h
 
Old 04-06-2010, 11:47 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,759

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
.. And why not install pgplot with :
sudo apt-get install pgplot


Also : There is no reason to have any "system files"
in /usr/local/ .
Those files would fit your OS much better, if you did :

sudo apt-get install libpng12-dev libpng3-dev zlib1g-dev
.....

Alternatively, use the Package Manager = Synaptic
for package install. Very few packages are not found
using ether 'sudo apt-get install' or 'synaptic' :
About 25,000 packages are available.
.....
 
Old 05-08-2010, 03:43 AM   #4
moravveji
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
Hi all,
I tried to install pgplot on my Ubuntu 9.10 with the recommended command:
sudo apt-get install pgplot5
It succeeded to install it, but I cannot find any libpgplot.a to link to.
Can anyone help?
Best.
 
Old 05-08-2010, 03:53 AM   #5
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
First make sure you have all the required packages installed for compiling in ubuntu:
Code:
sudo apt-get install build-essential automake checkinstall
Also you can refer http://www.astro.caltech.edu/~tjp/pg...tall-unix.html

Last edited by ajeetsinghraina; 05-08-2010 at 03:54 AM.
 
Old 05-08-2010, 04:12 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,759

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
dpkg -L pgplot5
/usr/lib/libpgplot.a

.. Or have a look into the online file list ..
http://packages.ubuntu.com/karmic/i386/pgplot5/filelist

..
 
Old 05-09-2010, 12:51 AM   #7
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Original Poster
Rep: Reputation: 1
solve the problem

thanks for your helping
I can solve the problem by installing "libpng" i didn't have this library





Quote:
Originally Posted by knudfl View Post
dpkg -L pgplot5




/usr/lib/libpgplot.a

.. Or have a look into the online file list ..
http://packages.ubuntu.com/karmic/i386/pgplot5/filelist

..
 
Old 05-09-2010, 10:15 AM   #8
moravveji
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
Hi all, I'm back with another question.
In order to direct the output from pgplot to the xwindow system, I have to give a link to the X11 library, as:

f77 -o example example.f -L /usr/lib -lpgplot -L /usr/share/X11 -lX11
However, I do not find a proper X11 library on my system. I have to say that I use Ubuntu 9.10, and benefit the whole graphic features included.
When trying to locate X11 directories, I receive this:

ehsan@ehsan:~/Desktop$ whereis X11
X11: /usr/bin/X11 /etc/X11 /usr/lib/X11 /usr/include/X11 /usr/share/X11

However, none of these paths are suitable to give the link to X11 when compiling with X11.
I also have to add, when I compile like this:
f77 -o example example.f -L /usr/lib -lpgplot
I can happily have the output as postscript or png file.

Thanks for all your supports in advance.
Ehsan.
 
Old 05-10-2010, 01:42 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,759

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
"" whereis X11 "" will only show the word X11,
not libX11.so ( /usr/lib/libX11.so )
I.e. 'whereis' : No wildcards.

To get "libX11.so" : sudo apt-get install libx11-dev

Now you can link against libX11 : -lX11
..
 
1 members found this post helpful.
Old 05-11-2010, 12:30 AM   #10
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Original Poster
Rep: Reputation: 1
hi ehsan
I think it can help you if link related library and add it's address to your bashrc




Quote:
Originally Posted by moravveji View Post
Hi all, I'm back with another question.
In order to direct the output from pgplot to the xwindow system, I have to give a link to the X11 library, as:

f77 -o example example.f -L /usr/lib -lpgplot -L /usr/share/X11 -lX11
However, I do not find a proper X11 library on my system. I have to say that I use Ubuntu 9.10, and benefit the whole graphic features included.
When trying to locate X11 directories, I receive this:

ehsan@ehsan:~/Desktop$ whereis X11
X11: /usr/bin/X11 /etc/X11 /usr/lib/X11 /usr/include/X11 /usr/share/X11

However, none of these paths are suitable to give the link to X11 when compiling with X11.
I also have to add, when I compile like this:
f77 -o example example.f -L /usr/lib -lpgplot
I can happily have the output as postscript or png file.

Thanks for all your supports in advance.
Ehsan.
 
1 members found this post helpful.
Old 05-15-2010, 10:51 AM   #11
moravveji
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
Hi all, and thanks so much for your helps.
I already had libx11-dev installed, and found the path to libx11.so at /usr/lib.
I successfully link to this library as
f77 -o simple_ehsan simple.f -L /usr/lib -lpgplot -L /usr/lib -lX11
But, when running the code, which in return calls pgplot, I receive the following error message:

ehsan@ehsan:~/programs/pgmoog/testprog$ ./simple_ehsan
Graphics device/type (? to see list, default /xwin): /xwin
PGPLOT /xw: cannot connect to X server [0]

I also receive the same complaint when trying to run /usr/bin/xclock:
root@ehsan:/usr/bin# ./xclock
Error: Can't open display: 0

I cannot figure out with the on-screen display problem I have. I also have to mention that I'm an Ubuntu newbie.
Best wishes.
 
Old 06-20-2010, 03:02 AM   #12
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Original Poster
Rep: Reputation: 1
pgplot problem

Hi i'm opensuse 11.2 64-bit user

I've installed pgplot-5.2 but I can not run it the first time got this error:
error while loading shared libraries: libXdcmp.so.6: cannot open shared object file: No such file or directory

so I've installed this package :xorg-x11-libXdcmp-7.4-6.1.x86_64.rpm

yet I have some problem : error while loading shared libraries: libXdmcp.so.6: wrong ELF class: ELFCLASS64

now what should I do

Last edited by sarahf60; 06-20-2010 at 03:24 AM.
 
Old 06-21-2010, 03:38 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,759

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
Post # 12 , sarahf60 : How and what did you install ? ?
The full filename / package name, please.
And a link to where you got it.


Seems you are trying to run a 32 Bits 'pgplot-5.2' ?
Suggest : Use a 64 Bits 'pgplot' : x86_64.

..
 
Old 07-04-2010, 02:08 AM   #14
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by knudfl View Post
Post # 12 , sarahf60 : How and what did you install ? ?
The full filename / package name, please.
And a link to where you got it.


Seems you are trying to run a 32 Bits 'pgplot-5.2' ?
Suggest : Use a 64 Bits 'pgplot' : x86_64.

..
ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz
I'd install it before on suse 10.3 but now can not install it on suse 11.2
 
Old 07-04-2010, 02:09 AM   #15
sarahf60
LQ Newbie
 
Registered: Feb 2010
Posts: 20

Original Poster
Rep: Reputation: 1
ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz
I'd install it before on suse 10.3 but now can not install it on suse 11.2

cp drivers.list /usr/local/pgplot/
gedit /usr/local/pgplot/drivers.list
uncomment these:
GIDRIV 1 /GIF GIF-format file, landscape
PNDRIV 1 /PNG Portable Network Graphics file C
PNDRIV 2 /TPNG Portable Network Graphics file - transparent background C
PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77
PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77
PSDRIV 3 /CPS PostScript printers, color, landscape Std F77
PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77
XWDRIV 1 /XWINDOW Workstations running X Window System C
XWDRIV 2 /XSERVE Persistent window on X Window System C
cd /usr/local/pgplot/
/home/sarah/src/pgplot/makemake /home/sarah/src/pgplot linux g77_gcc
gedit makefile
pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h change to : pndriv.o : /usr/local/include/png.h /usr/local/include/pngconf.h /usr/local/include/zlib.h /usr/local/include/zconf.h
make
make cpg
export PGPLOT_DIR=/usr/local/pgplot
source ~/.bashrc
ln -s libpgplot.so /usr/lib/libpgplot.so
ln -s libcpgplot.a /usr/lib/libcpgplot.a
ln -s cpgplot.h /usr/include/cpgplot.h

Last edited by sarahf60; 07-04-2010 at 02:13 AM.
 
  


Reply


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
Pgplot mghuffman Linux - Software 15 03-04-2010 09:27 AM
pgplot problem sarahf60 Linux - Newbie 5 02-25-2010 08:11 PM
[SOLVED] A problem during PGPLOT installation msbstar Linux - Newbie 7 01-28-2010 11:33 AM
pgplot installation in fedora 10 pratyuze Linux - Software 4 01-16-2009 11:08 AM
PGPLOT&can not find libpng lengyue Linux - Software 1 08-16-2008 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration