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