Training, Open Source computer languages

This is page http://www.wellho.net/forum/Perl-Programming/Cannot-i ... -RH-8.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Cannot install perl module on Linux RH 8

Posted by duuR (duuR), 10 January 2003
Hi all,

As I'm quite new to Linux and Perl I'm having some difficulties now which I'm unable to solve using Google

I'm trying to install the Math::LP::Solve module but to no avail. I first tried installing the Math::LP module by typing:

perl -MCPAN -e 'install Math::LP'

and it warned me about some prerequisites not found on my system and prepended them to the queue.

I confirmed that it should prepend them. But in the end it didn't install correctly. Only modules installed were Math::LinearCombination and Math::SimpleVariable. It ended in something like:

-----------------------------------------
Running make install
 make test had returned bad status, won't install without force
-----------------------------------------

It seemed that the Math::LP::Solve module caused the failure so I tried
installing only the Math::LP::Solve module.

This is the output:

-----------------------------------------
[root@unavailable cgi-bin]# perl -MCPAN -e 'install Math::LP::Solve'

CPAN: Storable loaded ok

Going to read /root/.cpan/Metadata

 Database was generated on Mon, 06 Jan 2003 15:17:21 GMT

Running install for module Math::LP::Solve

Running make for W/WI/WIMV/Math-LP-Solve-3.03.tar.gz

CPAN: Digest::MD5 loaded ok

CPAN: Compress::Zlib loaded ok

Checksum for
/root/.cpan/sources/authors/id/W/WI/WIMV/Math-LP-Solve-3.03.tar.gz ok

Scanning cache /root/.cpan/build for sizes

Math-LP-Solve-3.03/

Math-LP-Solve-3.03/t/

Math-LP-Solve-3.03/t/lp_examples/

Math-LP-Solve-3.03/t/lp_examples/ex3.out

Math-LP-Solve-3.03/t/lp_examples/ex4.out

Math-LP-Solve-3.03/t/lp_examples/ex1.lp

Math-LP-Solve-3.03/t/lp_examples/ex5.out

Math-LP-Solve-3.03/t/lp_examples/ex2.lp

Math-LP-Solve-3.03/t/lp_examples/ex6.out

Math-LP-Solve-3.03/t/lp_examples/ex3.lp

Math-LP-Solve-3.03/t/lp_examples/ex4.lp

Math-LP-Solve-3.03/t/lp_examples/ex1.out

Math-LP-Solve-3.03/t/lp_examples/ex5.lp

Math-LP-Solve-3.03/t/lp_examples/ex6.lp

Math-LP-Solve-3.03/t/lp_examples/ex2.out

Math-LP-Solve-3.03/t/print_solution.pl

Math-LP-Solve-3.03/t/02regress.t

Math-LP-Solve-3.03/t/01solve.t

Math-LP-Solve-3.03/t/round_numbers.pl

Math-LP-Solve-3.03/README

Math-LP-Solve-3.03/MANIFEST

Math-LP-Solve-3.03/Changes

Math-LP-Solve-3.03/Makefile.PL

Math-LP-Solve-3.03/contrib/

Math-LP-Solve-3.03/contrib/add_pm_version_number.pl

Math-LP-Solve-3.03/contrib/export_swigged_symbols.pl

Math-LP-Solve-3.03/Solve.c

Math-LP-Solve-3.03/Solve.pod

Math-LP-Solve-3.03/Solve.pm

Math-LP-Solve-3.03/Solve.i

Removing previously used /root/.cpan/build/Math-LP-Solve-3.03



 CPAN.pm: Going to build W/WI/WIMV/Math-LP-Solve-3.03.tar.gz



*** You do not have a lp_solve_3.2 directory yet.

*** I will extract it for you from lp_solve_3.2.tar.gz.

*** But first I need to download lp_solve_3.2.tar.gz to the current
directory.

Fetching ftp://ftp.ics.ele.tue.nl/pub/lp_solve/lp_solve_3.2.tar.gz ...

############################################################################
####################

Extracting lp_solve_3.2.tar.gz ...

*** You do not have lp_solve_3.2/liblpk.a yet.

*** I will attempt to compile it for you.

Compiling in lp_solve_3.2 with `cd lp_solve_3.2 && make liblpk.a CC="gcc"
CFLAGS=" -O2 -march=i386 -mcpu=i686 -fpic" LEX="lex" MATHLIB="-lm"
YACC="yacc" && cd /root/.cpan/build/Math-LP-Solve-3.03' ...

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o lpkit.o lpkit.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o solve.o solve.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o debug.o debug.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o read.o read.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o readmps.o readmps.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o hash.o hash.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o presolve.o presolve.c

yacc lp.y

mv y.tab.c lp.c

lex lex.l

mv lex.yy.c lex.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o lp.o lp.c

In file included from lp.y:203:

lex.c:267: conflicting types for `yytext'

lpglob.h:38: previous declaration of `yytext'

make: *** [lp.o] Error 1

*** Oops! Compilation failed.

*** I will cleanup and recompile with other flags if available ...

Cleaning up with `cd lp_solve_3.2 && make clean && cd
/root/.cpan/build/Math-LP-Solve-3.03' ...

rm -f *.a *.o TAGS lex.c lp.c demo lp_solve lp2mps mps2lp .pure
.softdebughist datafile

Compiling in lp_solve_3.2 with `cd lp_solve_3.2 && make liblpk.a CC="gcc"
CFLAGS=" -O2 -march=i386 -mcpu=i686 -fpic" LEX="flex -l" LEXLIB="-lfl"
MATHLIB="-lm" && cd /root/.cpan/build/Math-LP-Solve-3.03' ...

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o lpkit.o lpkit.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o solve.o solve.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o debug.o debug.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o read.o read.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o readmps.o readmps.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o hash.o hash.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o presolve.o presolve.c

bison -y lp.y

mv y.tab.c lp.c

flex -l lex.l

mv lex.yy.c lex.c

gcc -O2 -march=i386 -mcpu=i686 -fpic   -c -o lp.o lp.c

ar rv liblpk.a lpkit.o solve.o debug.o read.o readmps.o hash.o presolve.o
lp.o

a - lpkit.o

a - solve.o

a - debug.o

a - read.o

a - readmps.o

a - hash.o

a - presolve.o

a - lp.o

ranlib liblpk.a

Compilation OK.

*** Nice! I succeeded in compiling lp_solve_3.2/liblpk.a.

Checking if your kit is complete...

Looks good

Warning: -Llp_solve_3.2 changed
to -L/root/.cpan/build/Math-LP-Solve-3.03/lp_solve_3.2

Writing Makefile for Math::LP::Solve

cp Solve.pm blib/lib/Math/LP/Solve.pm

cp Solve.pod blib/lib/Math/LP/Solve.pod

make: Circular Solve.i <- Solve.c dependency dropped.

gcc -c  -Ilp_solve_3.2 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LA
RGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -march=i386 -m
cpu=i686   -DVERSION=\"3.03\" -DXS_VERSION=\"3.03\" -fpic
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   Solve.c

Solve.c: In function `_swig_create_magic':

Solve.c:416: warning: assignment from incompatible pointer type

Solve.c:417: warning: assignment from incompatible pointer type

In file included from Solve.c:444:

lp_solve_3.2/lpkit.h:471:17: macro "yyparse" passed 1 arguments, but takes
just 0

Solve.c: At top level:

Solve.c:5671: conflicting types for `boot_Math__LP__Solve'

Solve.c:431: previous declaration of `boot_Math__LP__Solve'

make: *** [Solve.o] Error 1

 /usr/bin/make  -- NOT OK

Running make test

 Can't test without successful make

Running make install

 make had returned bad status, install seems impossible

-----------------------------------------



I've tried re-installing RedHat 8.0 but it was exactly the same.

Any help would be appreciated.


Posted by admin (Graham Ellis), 10 January 2003
That's not going to be a quick one to answer!   I've noted your post and I'll look at it / answer more fully in the next 24 hours

Posted by duuR (duuR), 10 January 2003
Thanks for the quick response, a search for precompiled versions didn't yield anything either.

Posted by John_Moylan (jfp), 10 January 2003
Hmmm, I was curious and tried to install it too.

perl -MCPAN -e shell

cpan> install Math::LP

And installed wihtout problems on RH 7.3

Probably not what you wanted to hear, but it's one more variable out the way.

jfp

Posted by duuR (duuR), 10 January 2003
That would suggest it's RH 8 related. I did install all the available RH 'fixes' so it might be a bug. If all else fails I could always install RH 7 because I do need that module.

Posted by admin (Graham Ellis), 11 January 2003
I've just had a further chance to look at the original logs, and read the follow ups too ... it looks to me like the underlying problem is not with the CPAN module itself, but with the underlying module that it downloads from ftp://ftp.ics.ele.tue.nl/pub/lp_solve/lp_solve_3.2.tar.gz; as a wild guess there's a problem at the "cpp" - C PreProcessor - level as the system adjusts the source code in C to suit the architecture of the computer that it's running on.

I don't have a RH8 system to hand   ... so I can't start dooing any experiments here;  if I had, I guess I would proceed:
1. Reproduce the problem in RH8
2. Check that there was no problem in RH7 (just in case there's something else different between jfp and duuR's systems)
3. Try to install the lp_solve library outside the CPAN loader (i.e. grab a copy of the file from the dutch site).

Have a look and see if there's a README or INSTALL file in the tar file containing the lp_solve library - tips, techniques, contacts;  it's quite possible that the authors HAVE come across the problem with RH8, but that the automated procedure to install the module that's part of the CPAN doesn't reflect advise and instructions that they have added to their documentation.

Not a "here is how you solve the problem" answer, I'm afraid, but some pointers and ideas that may help you along towards that answer.  Hope it helps - Graham

Posted by duuR (duuR), 14 January 2003
Maybe I was a bit over enthusiastic when installing RH8.0 and would RH7.* better suit my needs. A friend has RH7.4 or 7.3, I might try and install that.

Copies of the module from outside CPAN had the same results. I have notified the author but no reply as yet.

As soon as I have it fixed I will post a message.

Posted by admin (Graham Ellis), 15 January 2003
Quote:
As soon as I have it fixed I will post a message.


Much appreciated

- Graham

Posted by duuR (duuR), 1 March 2003
Alas, no joy...

I installed version 7.3 and it did not install either. This time the error messages are a bit different though.

First I did this:

perl -MCPAN -e 'install Math::LP'

This ended in error messages stating it could not find LP::Solve in @inc.

So I did this:

perl -MCPAN -e 'install Math::LP::Solve'

CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
 Database was generated on Sat, 01 Mar 2003 03:11:15 GMT
Running install for module Math::LP::Solve
Running make for W/WI/WIMV/Math-LP-Solve-3.03.tar.gz

 CPAN: MD5 security checks disabled because MD5 not installed.
 Please consider installing the MD5 module.

Scanning cache /root/.cpan/build for sizes
Math-LP-Solve-3.03/
Math-LP-Solve-3.03/t/
Math-LP-Solve-3.03/t/lp_examples/
Math-LP-Solve-3.03/t/lp_examples/ex3.out
Math-LP-Solve-3.03/t/lp_examples/ex4.out
Math-LP-Solve-3.03/t/lp_examples/ex1.lp
Math-LP-Solve-3.03/t/lp_examples/ex5.out
Math-LP-Solve-3.03/t/lp_examples/ex2.lp
Math-LP-Solve-3.03/t/lp_examples/ex6.out
Math-LP-Solve-3.03/t/lp_examples/ex3.lp
Math-LP-Solve-3.03/t/lp_examples/ex4.lp
Math-LP-Solve-3.03/t/lp_examples/ex1.out
Math-LP-Solve-3.03/t/lp_examples/ex5.lp
Math-LP-Solve-3.03/t/lp_examples/ex6.lp
Math-LP-Solve-3.03/t/lp_examples/ex2.out
Math-LP-Solve-3.03/t/print_solution.pl
Math-LP-Solve-3.03/t/02regress.t
Math-LP-Solve-3.03/t/01solve.t
Math-LP-Solve-3.03/t/round_numbers.pl
Math-LP-Solve-3.03/README
Math-LP-Solve-3.03/MANIFEST
Math-LP-Solve-3.03/Changes
Math-LP-Solve-3.03/Makefile.PL
Math-LP-Solve-3.03/contrib/
Math-LP-Solve-3.03/contrib/add_pm_version_number.pl
Math-LP-Solve-3.03/contrib/export_swigged_symbols.pl
Math-LP-Solve-3.03/Solve.c
Math-LP-Solve-3.03/Solve.pod
Math-LP-Solve-3.03/Solve.pm
Math-LP-Solve-3.03/Solve.i
Removing previously used /root/.cpan/build/Math-LP-Solve-3.03

 CPAN.pm: Going to build W/WI/WIMV/Math-LP-Solve-3.03.tar.gz

*** You do not have a lp_solve_3.2 directory yet.
*** I will extract it for you from lp_solve_3.2.tar.gz.
*** But first I need to download lp_solve_3.2.tar.gz to the current directory.
Fetching ftp://ftp.ics.ele.tue.nl/pub/lp_solve/lp_solve_3.2.tar.gz ...
################################################################################################
Extracting lp_solve_3.2.tar.gz ...
Could not untar `lp_solve_3.2.tar.gz'
Running make test
 Make had some problems, maybe interrupted? Won't test
Running make install
 Make had some problems, maybe interrupted? Won't install

The author did not reply either so I'm in a bit of a puddle.

Does anyone know what seems to be the problem? I can manually untar stuff so it is installed...

Thanks in advance, I'm about to give in to this...  

Ruud

Posted by duuR (duuR), 2 March 2003
Results at last! After the error messages I installed the Bundle::CPAN. After that I tried the installation again and it installed without any errors.  

I tried the same with RH 8.0 and that did not help then. So it does seem that the LP package is not yet suitable for RH 8.0. The error messages I got with RH 8.0 where C related I think.

Could one of you tell me what this Bundle::CPAN thingie does, the text is a bit unclear to me.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho