LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-16-2010, 04:06 PM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Opencascade RPM for centOS


Hi,

Anybody knows of a CentOS 5.x compatible package for OpenCascade 6.3...?

I'm getting tired of trying to build this... ...
 
Old 11-16-2010, 04:22 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I don't but what are you encountering .. compiling problems or rpm packaging problems ?
 
1 members found this post helpful.
Old 11-16-2010, 04:44 PM   #3
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Compiling probs...

I set

export CXXFLAGS=$CXXFLAGS" -ffriend-injection -fpermissive"
...

in short, i reproduce step by step what's in a pkgbuild from Arch, apply the patches, sed the sources, source the environment vars...



Quote:
# Maintainer: Michele Mocciola <mickele>
# Contributor: Brice M�alier <mealier_brice@yahoo.fr>
# Contributor: Giuseppe Borzi <gborzi>

pkgname=opencascade
pkgver=6.3.0
pkgrel=10
pkgdesc="Software development platform including components for 3D surface and solid modeling, visualization, data exchange and rapid application development."
url="http://www.opencascade.org"
license="custom"
depends=('tk' 'mesa' 'java-runtime')
makedepends=('autoconf' 'patch' 'coreutils' 'sed' 'make' 'gcc' 'java-environment')
provides=()
conflicts=()
options=()
replaces=()
arch=('i686' 'x86_64')
backup=()
install=(opencascade.install)
source=('http://files.opencascade.com/OCC_6.3_release/OpenCASCADE_src.tgz' 'env.sh' 'opencascade-6.3.0sp9.diff' 'lib-release.patch' 'opencascade.sh' 'opencascade.conf')

# Installation dir
_installdir=/opt/opencascade

build() {
cd "${srcdir}/OpenCASCADE${pkgver}" || return 1

# Apply patch available on www.salome-platform.org for Service Pack 9
# applying this patch we should obtain something symilar to version 6.3.1
patch -Np1 -i "${srcdir}/opencascade-6.3.0sp9.diff" || return 1

# Apply a patch taken from debian site (thanks to debian maintainers)
# lib-release.patch - without this patch release number of the libraries is 0.0.0
patch -Np1 -i "${srcdir}/lib-release.patch" || return 1

cd "${srcdir}/OpenCASCADE${pkgver}/ros" || return 1

# Set variables necessary to compile th package
export CXXFLAGS=$CXXFLAGS" -ffriend-injection -fpermissive"
export CASROOT="\"${srcdir}/${pkgname}-${pkgver}/ros\""
rm env.csh env.ksh || return 1
source "${srcdir}/env.sh"
# Adjusts reference to X11 libraries and headers
for _FILE in `grep -R -l "/usr/X11R6/lib" src/*`
do
sed -e "s|/usr/X11R6/lib|/usr/lib/X11|g" -i $_FILE
done
for _FILE in `grep -R -l "/usr/X11R6/include" src/*`
do
sed -e "s|/usr/X11R6/include|/usr/include/X11|g" -i $_FILE
done

# Adjusts DESTDIR prefix in Makefile.am and reconfigures files
sed -e "s| \$(prefix)| \$(DESTDIR)\$(prefix)|g" -i Makefile.am
autoreconf -f -i

# And now we can build our libraries...
./configure --with-tcl=/usr/lib --with-tk=/usr/lib --disable-debug --enable-production --with-java-include=${JAVA_HOME}/include --prefix=${_installdir} || return 1
make || return 1
}

package(){
cd "${srcdir}/OpenCASCADE${pkgver}/ros" || return 1

make install DESTDIR="${pkgdir}" || return 1

# I prefer having a link to a more standard dir
ln -s ./inc "${pkgdir}${_installdir}/include" || return 1

# Install a file containing instruction necessary to link againt these libraries
install -D -m644 "${srcdir}/opencascade.conf" "${pkgdir}/etc/ld.so.conf.d/opencascade.conf" || return 1

# Copy the profile file
install -D -m 755 "${srcdir}/opencascade.sh" "${pkgdir}/etc/profile.d/opencascade.sh" || return 1
install -m 755 "${srcdir}/env.sh" "${pkgdir}${_installdir}" || return 1
rm -f "${pkgdir}${_installdir}/env_DRAW.sh" || return 1

# Copy the license files
install -D -m 644 "${srcdir}/OpenCASCADE${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
}
md5sums=('52778127974cb3141c2827f9d40d1f11'
'acf8ad1e470cd7d1c2033954c1b0f03a'
'e1b34679e2b0d892e7f182545ccab92a'
'32268a33ba39912b54cf3f654011da90'
'd9368b8d348ced3ec4462012977552d2'
'2924ecf57c95d25888f51071fdc72ad0')


only when i get to

make

I get this s**t.... :


Quote:
make all-recursive
make[1]: Entering directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros'
Making all in adm/make
make[2]: Entering directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros/adm/make'
Making all in TKernel
make[3]: Entering directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros/adm/make/TKernel'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/FSD -I../../../src/FSD -I../../../drv/MMgt -I../../../src/MMgt -I../../../drv/OSD -I../../../src/OSD -I../../../drv/Plugin -I../../../src/Plugin -I../../../drv/Quantity -I../../../src/Quantity -I../../../drv/Resource -I../../../src/Resource -I../../../drv/SortTools -I../../../src/SortTools -I../../../drv/Standard -I../../../src/Standard -I../../../drv/StdFail -I../../../src/StdFail -I../../../drv/Storage -I../../../src/Storage -I../../../drv/TColStd -I../../../src/TColStd -I../../../drv/TCollection -I../../../src/TCollection -I../../../drv/TShort -I../../../src/TShort -I../../../drv/Units -I../../../src/Units -I../../../drv/UnitsAPI -I../../../src/UnitsAPI -I../../../drv/IncludeLibrary -I../../../src/IncludeLibrary -I../../../drv/Dico -I../../../src/Dico -I../../../drv/NCollection -I../../../src/NCollection -I../../../drv/Message -I../../../src/Message -D_OCC64 -m64 -DNDEBUG -DNo_Exception -ffriend-injection -fpermissive -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT Dico_DictionaryOfInteger_0.lo -MD -MP -MF ".deps/Dico_DictionaryOfInteger_0.Tpo" -c -o Dico_DictionaryOfInteger_0.lo `test -f '../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx' || echo './'`../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx; \
then mv -f ".deps/Dico_DictionaryOfInteger_0.Tpo" ".deps/Dico_DictionaryOfInteger_0.Plo"; else rm -f ".deps/Dico_DictionaryOfInteger_0.Tpo"; exit 1; fi
libtool: unrecognized option `--tag=CXX'
Try `libtool --help' for more information.
make[3]: *** [Dico_DictionaryOfInteger_0.lo] Error 1
make[3]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros/adm/make/TKernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/opencascade/OpenCASCADE6.3.0/ros'
make: *** [all] Error 2
My problem is not with packaging...

my configure line is
./configure --with-tcl=/usr/lib64 --with-tk=/usr/lib64 --disable-debug --enable-production --prefix=/opt/opencascade

obviously i would

make DESTDIR=/some/path/openCascade-6.3.0-root install,

cd to my top dir, and run rpmbuild -bb -v with an opencacscade.spec without the build section... ( it would have been built already ) just to package it...

but i don't even get to build the thing... that's why i wish there was an rpm for x86_64 already packed...

 
Old 11-16-2010, 04:49 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Does it compile if you use a simple -

./configure
make

?
 
1 members found this post helpful.
Old 11-16-2010, 05:03 PM   #5
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
nop...

Quote:
[alex@iskandhar ros]$ make
cd . && /bin/sh /home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/make/missing --run aclocal-1.7
cd . && \
/bin/sh /home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/make/missing --run automake-1.7 --foreign Makefile
Makefile.am:3: directory should not contain `/'
make: *** [Makefile.in] Error 1
[alex@iskandhar ros]$

so i run aclocal, and automake...

and then make,,,

with this glorious end...

Quote:
config.status: executing depfiles commands
make[3]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/adm/make/TKernel'
make[3]: Entering directory `/home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/adm/make/TKernel'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/FSD -I../../../src/FSD -I../../../drv/MMgt -I../../../src/MMgt -I../../../drv/OSD -I../../../src/OSD -I../../../drv/Plugin -I../../../src/Plugin -I../../../drv/Quantity -I../../../src/Quantity -I../../../drv/Resource -I../../../src/Resource -I../../../drv/SortTools -I../../../src/SortTools -I../../../drv/Standard -I../../../src/Standard -I../../../drv/StdFail -I../../../src/StdFail -I../../../drv/Storage -I../../../src/Storage -I../../../drv/TColStd -I../../../src/TColStd -I../../../drv/TCollection -I../../../src/TCollection -I../../../drv/TShort -I../../../src/TShort -I../../../drv/Units -I../../../src/Units -I../../../drv/UnitsAPI -I../../../src/UnitsAPI -I../../../drv/IncludeLibrary -I../../../src/IncludeLibrary -I../../../drv/Dico -I../../../src/Dico -I../../../drv/NCollection -I../../../src/NCollection -I../../../drv/Message -I../../../src/Message -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT Dico_DictionaryOfInteger_0.lo -MD -MP -MF ".deps/Dico_DictionaryOfInteger_0.Tpo" -c -o Dico_DictionaryOfInteger_0.lo `test -f '../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx' || echo './'`../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx; \
then mv -f ".deps/Dico_DictionaryOfInteger_0.Tpo" ".deps/Dico_DictionaryOfInteger_0.Plo"; else rm -f ".deps/Dico_DictionaryOfInteger_0.Tpo"; exit 1; fi
libtool: unrecognized option `--tag=CXX'
Try `libtool --help' for more information.
make[3]: *** [Dico_DictionaryOfInteger_0.lo] Error 1
make[3]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/adm/make/TKernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Desktop/My_Pkgs/OpenCascade/OpenCASCADE6.3.0/ros'
make: *** [all] Error 2
[alex@iskandhar ros]$
no patching and hacking this time...
 
Old 11-16-2010, 05:52 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
A quick search gave me this:

Quote:
Libtool 1.4.X does not support --tag while 1.5.X and later does.
Apparently you are accidentally using libtool 1.4.X components.
Which version of libtool are you using ?
 
1 members found this post helpful.
Old 11-17-2010, 06:23 AM   #7
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
... apparently neither does 1.5x...

Quote:
[alex@iskandhar ~]$ libtool --version
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[alex@iskandhar ~]$
I'm using Scientific Linux 5.5 ( same as Rhel 5.5 or CentOS 5.5 ) with latest updates :

Quote:
[alex@iskandhar ~]$ su root
Password:
[root@iskandhar alex]# yum update
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-
: data, kernel-module, kmod, list-data, merge-conf, priorities, protect-
: packages, protectbase, refresh-updatesd, tsflags, upgrade-helper,
: versionlock
Loading mirror speeds from cached hostfile
* epel: ftp.gui.uva.es
* sl-base: ftp1.scientificlinux.org
* sl-security: ftp1.scientificlinux.org
Skipping filters plugin, no data
130 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Reading version lock configuration
Setting up Update Process
No Packages marked for Update
[root@iskandhar alex]#

Last edited by Alexvader; 11-17-2010 at 06:50 AM.
 
Old 11-17-2010, 08:48 AM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Can you check to make sure there are no libtool components included in the source tarball ?
 
1 members found this post helpful.
Old 11-17-2010, 10:54 AM   #9
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
AFAIK there aren't... they ship the source code as some 130 Mb tarball called opencascade.src.tgz that expands into 600s megs of source code...

How can I be positively sure about this...?

The configure script would necessarily include the option to use the shipped libtool then... but it does not...

... seems logic to me...
 
Old 11-17-2010, 12:18 PM   #10
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi again g00gl3 was my friend ... ( ... crossing fingers )

http://www.opencascade.org/org/forum/thread_14284/

I will try to follow this pkgbuild thing by hand, patching, seding, etc, and run like this :

Quote:
Neal,

Looks like the libtool (version 1.4.3) used to build the distribution was broken. As such, the shared library extension (*.so) is not added to the output library names (hence libTKMath.0.0.0 instead of libTKMath.so.0.0.0).

I was able to get a successful installation using libtool 1.5.6 on my CentOS 4.6 x86_64 machine. Basically, you have to re-run `libtoolize --force` in the "ros" directory prior to running `configure`. Again, this must be done before running `configure`. For me this involved:

% cd OpenCASCADE6.3.0/ros
% libtoolize --force
% mkdir build
% cd build
% ../configure --prefix=/usr/local/pkgs/OpenCASCADE-6.3.0 --with-gl-include=/usr/include --with-gl-library=/usr/lib --x-libraries=/usr/X11R6/lib --with-xmu-include=/usr/X11R6/include/X11 --with-xmu-library=/usr/X11R6/lib --with-tcl=/usr/lib --with-tk=/usr/lib --with-java-include=/usr/java/default/include --disable-debug --enable-production --enable-draw --enable-wok CC="gcc -m32" CXX="g++ -m32"
% make
% make install

This resulted in an installation of the binaries, includes, and libraries in my "--prefix" path.

% ls /usr/local/pkgs/OpenCASCADE-6.3.0
bin config.h env_DRAW.sh inc lib lin Linux src
taking into account that this is a CentOS 5.5 like thing not a CentOS 4.6

... this is only 630 Mb of source code... takes a "while" to compile...

Last edited by Alexvader; 11-17-2010 at 12:20 PM.
 
Old 11-17-2010, 02:49 PM   #11
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
W000t...

Solved it... libtoolize --force did the trick...

Now just for another question... :

This is properly configured, and is building beyond that cranky error of CXX=TAG...

... has been so for the last half an hour... its "only" 630 Mb of source code...

...if I stop the build and turn off the PC, may I resume it later...?
 
Old 11-17-2010, 03:54 PM   #12
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Yeah .. 'make' won't repeat steps that are already completed. A 'make clean' would remove all the object files and force you to start again.
 
1 members found this post helpful.
Old 11-17-2010, 04:13 PM   #13
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Thx kbp
 
Old 11-18-2010, 09:07 AM   #14
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi

Just built the "thingie" and packed it...

Geeezzz... took 3:30 hours to build, and I am talking of a core2 duo at 2.93 Gigs and 8 Gb Ram hw....

Anyway I have an rpm for the "thing", hope I do not have to go all along this drill once SL 6 is out...

I mean... if it is called "Scientific Linux" how come I have to build lots of packages I have available in "Not-So-Scientific Lenny"...?

Paraview, Scilab, Gmsh, arpack, mumps, netgen, Mayavi, opencascade, etc...?
 
  


Reply



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
which RPM should i install for centos 5.4?? h4u General 3 08-01-2010 09:05 AM
Building OpenCascade in Slackware64 13 Alexvader Slackware 2 03-21-2010 10:21 PM
ulogd rpm for centos 5 DBabo Linux - Software 4 03-01-2008 05:16 PM
Apache 2.0.54 rpm for CentOS Swakoo Linux - Software 4 05-14-2007 01:33 AM
Is CentOS RPM based? depam Linux - Software 3 09-25-2006 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:00 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