LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-21-2010, 07:26 PM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Building OpenCascade in Slackware64 13


Hi Forum

I have been trying to build the OpenCascade release 6.3.0 in my Slackware box...

This takes looong like sh**t... and I get frustrated like hell, because :

1. the thing actually builds, after 3 hrs or so of compiling...
2. If i try to enable some other stuff to use the opencascade libraries, like netGen, Freecad, or Gmsh, they fail to build with the opencascade enable features, like IGES/Brep import/export...

I have googled abit ... and I have successfully built and liked against it in Arch...

I used the AUR package...

Quote:
# Maintainer: mickele <mimocciola@yahoo.com>
# Contributor: Brice Méalier <mealier_brice@yahoo.fr>
pkgname=opencascade
pkgver=6.3.0
pkgrel=7
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.sh' 'opencascade-6.3.0sp6.diff' 'lib-release.patch')

_installdir=/opt/${pkgname}

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

# Apply patch available on www.salome-platform.org for Service Pack 6
# applying this patch we should have 6.3.1 version
patch -Np1 -i "${srcdir}/opencascade-6.3.0sp6.diff" || return 1

# We 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

export CXXFLAGS=$CXXFLAGS" -ffriend-injection -fpermissive"
export CASROOT="\"${srcdir}/$pkgname-$pkgver/ros\""
source "${srcdir}/env.sh"

# We have our env.sh
rm env.csh env.ksh || return 1

# 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

# Copy some file we need from source to the installation dir
install -d -m 755 "${pkgdir}$_installdir"
cp -r "${srcdir}/OpenCASCADE$pkgver/data" \
"${srcdir}/OpenCASCADE$pkgver/samples" \
"${srcdir}/OpenCASCADE$pkgver/adm" \
"${srcdir}/OpenCASCADE$pkgver/drv" \
"${srcdir}/OpenCASCADE$pkgver/make" \
"${srcdir}/OpenCASCADE$pkgver/src" \
"${pkgdir}${_installdir}"

# 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
make install DESTDIR="${pkgdir}" || return 1

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

# This file contains variables required by opencascade - it's slightly different from the one created by default
install -m 755 "${srcdir}/env.sh" "${pkgdir}${_installdir}" || return 1
rm -f "${pkgdir}${_installdir}/env_DRAW.sh" || return 1

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

# Copy the license files
install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgname}" || return 1
install -m 644 "${srcdir}/OpenCASCADE$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}" || return 1
}
md5sums=('52778127974cb3141c2827f9d40d1f11'
'acf8ad1e470cd7d1c2033954c1b0f03a'
'd9368b8d348ced3ec4462012977552d2'
'7c9bc562cb8e34cdf4e8ee74e2f908ec'
'32268a33ba39912b54cf3f654011da90')
and I have applied the patches suggested in the PKGBUILD... and ran these scripts in order to get stuff to compile properly :


tweak1.sh
Quote:
# 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/lib64/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
changed /usr/lib... to /usr/lib64, bcause this is Slackware, not Arch

and

tweak2.sh

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

# Copy some file we need from source to the installation dir
install -d -m 755 "${pkgdir}$_installdir"
cp -r "${srcdir}/OpenCASCADE$pkgver/data" \
"${srcdir}/OpenCASCADE$pkgver/samples" \
"${srcdir}/OpenCASCADE$pkgver/adm" \
"${srcdir}/OpenCASCADE$pkgver/drv" \
"${srcdir}/OpenCASCADE$pkgver/make" \
"${srcdir}/OpenCASCADE$pkgver/src" \
"${pkgdir}${_installdir}"
after having defined the variables defined in tweak2.sh

... I have updated CXXFLAGS, CASROOT, as well as sourcing env.sh prior to ./configuring, and making...

But somehow I am not getting a good feeling about this...

In arch it compiles much faster than it does in slackware...

I guess some things are not set up properly...

Is there a slackbuild for OpenCascade...?

BRGDS

Alex
 
Old 03-21-2010, 09:37 PM   #2
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Again...

I built the thingie...

I am now building gmsh so as to link against it... I'll post how it went...
 
Old 03-21-2010, 10:21 PM   #3
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi...

It went fine... OpenCascade is successfully built as i started it in the original post...

Most useless thread ever....

I just started it, antecipating there would be trouble, as it used to be... good I made it... Thanks to everyone that lost some time reading this...

BRGDS

Alex
 
  


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
Building a visualization Package in Slackware64 13 Alexvader Slackware 2 01-25-2010 10:55 AM
[SOLVED] Slackware64-C client wont detect Slackware64-C Samba server slackass Slackware 5 08-07-2009 11:23 PM
[SOLVED] Building Kid3 in Slackware64-Current ack_iix Slackware 1 08-02-2009 04:12 AM
building kdebluetooth from Slackbuilds on Slackware64-current gtludwig Slackware 5 06-27-2009 05:59 PM
[SOLVED] Building wine on Slackware64 JanZamoyski Slackware 22 06-13-2009 03:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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