Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Be nice to others! Read the FreeCAD code of conduct!
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Draft module checks at the beginning different versions of Coin. It would be another message.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Coin3D-pivy-db2e64a4a880.zip from https://bitbucket.org/Coin3D/pivy/downloads/
Coin-3.1.3.tar.gz from https://bitbucket.org/Coin3D/coin/downloads/
and I use swig 3.0.12
OK. I have found other site in Internet whit other versions. Maybe I will try other one.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
This version without Pivy (Draft, Arch and Path workbenches will be disabled) and Start workbench (Start workbench does not work), with oce (Open Cascade Community Edition).
(Binary packages have /usr/pkg install prefix mostly. I installed other items in /usr/pkg too becasue of search python path.)
I made the following steps as root:
- Set path to binary packages repository from 8.0_2018Q3 release with command:
export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/package ... 2018Q3/All - Install binary packages:
pkg_add cmake
pkg_add gmake
pkg_add gtar
pkg_add ccache
pkg_add python27
pkg_add py27-matplotlib
pkg_add qt4
pkg_add boost
pkg_add doxygen
pkg_add eigen3
pkg_add xerces-c
pkg_add zlib
pkg_add Coin
pkg_add oce
pkg_add zip
pkg_add swig3 - Run commands:
export PATH=$PATH:/usr/pkg/qt4/bin
export QTDIR=/usr/pkg/qt4 - Build and install pybind11:
- download pybind11-master.zip from https://github.com/pybind/pybind11 (Clone or download button)
- unzip -a pybind11-master.zip
cd pybind11-master
mkdir build
cd build
ccmake .. - press c, wait, press e
set variables:
CMAKE_INSTALL_PREFIX /usr/pkg
PYBIND11_PYTHON_VERSION 2.7
PYBIND11_TEST OFF
press c, wait, press c, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install pyside 1.2.2 group:
- download shiboken-1.2.2.tar.bz2, pyside-qt4.8+1.2.2.tar.bz2, pyside-tools-0.2.15.tar.gz from https://wiki.qt.io/PySide_Downloads
- build and install shiboken
- install libxslt package using the command pkg_add libxslt
- gtar -jxf shiboken-1.2.2.tar.bz2
cd shiboken-1.2.2 - replace with
Code: Select all
#define __STDC__
in ApiExtractor/parser/rpp/pp-qt-configurationCode: Select all
#define __STDC__ 1
- insert Code1 (Code1 is at the bottom of this report) at the beginnig of CMakeLists.txt
- mkdir build
cd build
ccmake .. - press c, wait, press e
set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, press e, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- build and install pyside-qt4.8
- gtar -jxf pyside-qt4.8+1.2.2.tar.bz2
cd pyside-qt4.8+1.2.2 - insert Code1 (Code1 is at the bottom of this report) at the beginnig of CMakeLists.txt
- mkdir build
cd build
ccmake .. - press c, wait
set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- gtar -jxf pyside-qt4.8+1.2.2.tar.bz2
- build and install pyside-tools
- gtar -zxf Tools-0.2.15.tar.gz
cd Tools-0.2.15 - insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
cd build
ccmake .. - press c, wait
set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- gtar -zxf Tools-0.2.15.tar.gz
- Build and install VTK
- install hdf5 package using the command pkg_add hdf5
- download VTK-7.1.1.tar.gz from https://vtk.org/download/
- gtar -zxf VTK-7.1.1.tar.gz
cd VTK-7.1.1 - add to 38 line in IO/LSDyna/private/LSDynaFamily.cxx file
Code: Select all
&& !defined(__NetBSD__)
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
cd build
ccmake .. - press c, wait, press e
set variables
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
VTK_PYTHON_VERSION 2.7
press c, wait, press e, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install MED
- download med-3.0.7.tar.gz from https://forge.scilab.org/index.php/p/me ... tallation/
- gtar -zxf med-3.0.7.tar.gz
cd med-3.0.7 - insert Code1 at the beginnig of CMakeLists.txt
- replace with
Code: Select all
MEDequivInfo(int fid, char *maa, int ind, char *eq, char *des)
in src/2.3.6/ci/MEDequivInfo.cCode: Select all
MEDequivInfo(med_idt fid, char *maa, int ind, char *eq, char *des)
- mkdir build
cd build
ccmake .. - press c, wait, press e
set variables:
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -L/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 -R/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2
press c, wait, press e, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install FreeCAD 0.17
- download FreeCAD-0.17.tar.gz from https://github.com/FreeCAD/FreeCAD/releases/tag/0.17
- gtar -zxf FreeCAD-0.17.tar.gz
- remove ^M dos signs from archive:
pack FreeCAD-0.17 directory to FreeCAD-0.17.zip using the command zip -r FreeCAD-0.17.zip FreeCAD-0.17
rm -r FreeCAD-0.17
unzip -a FreeCAD-0.17.zip
rm FreeCAD-0.17.zip
cd FreeCAD-0.17 - change to
Code: Select all
python
at 25 line in src/Mod/Path/libarea/CMakeLists.txt.Code: Select all
python27
If you don't do it, you will get error then:
Could not find the following Boost libraries:
boost_python - add at 60 line
Code: Select all
&& !defined(__NetBSD__)
addat 84 line in src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cppCode: Select all
|| defined(__NetBSD__)
- replace
with
Code: Select all
mib[1] = KERN_PROC; mib[2] = KERN_PROC_PATHNAME; mib[3] = -1;
in src/App/Application.cppCode: Select all
mib[1] = KERN_PROC_ARGS; mib[2] = -1; mib[3] = KERN_PROC_PATHNAME;
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
cd build
ccmake .. - press c, wait, press e
set variables:
BUILD_START OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
MpidotH /usr/pkg/include/mpi.h
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include -L/usr/X11R7/lib
press c, wait, press e, press g - gmake -jn place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Run command: unset PKG_PATH
After installation as user who has started X windows run command: FreeCAD &
APPENDIX
Below code allows cmake automaticaly set RPATH to libraries and setting LD_LIBRARY_PATH is not needed.
Code: Select all
#Code 1 (Always full RPATH)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib"
isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
#End of Code1
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
Wow. involved.
How about python3/Qt5 and for version 0.18 ?
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
I do not fly so high
Seriously, I wrote in one of the previous messages that I can not even build qt4 from the source code. And I laughed at myself. I'm not the creator of the packages.
A whole army of people is probably working on FreeCAD 0.18.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
P.S. Such progress does indicate, that eventually people using BSD platforms, should experience FreeCAD in a more streamlined way.
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
This version without Start workbench (Start workbench does not work), with oce (Open Cascade Community Edition).
(Binary packages use /usr/pkg install prefix mostly. I installed other items in /usr/pkg too becasue of search python path.)
I made the following steps as root:
- Set path to binary packages repository from 8.0_2018Q3 release with command:
export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/package ... 2018Q3/All - Install binary packages:
pkg_add cmake
pkg_add gmake
pkg_add gtar
pkg_add ccache
pkg_add python27
pkg_add py27-matplotlib
pkg_add qt4
pkg_add boost
pkg_add doxygen
pkg_add eigen3
pkg_add xerces-c
pkg_add zlib
pkg_add Coin
pkg_add oce
pkg_add zip
pkg_add swig3 - Run commands:
export PATH=$PATH:/usr/pkg/qt4/bin
export QTDIR=/usr/pkg/qt4 - Build and install pybind11
- download pybind11-master.zip from https://github.com/pybind/pybind11
(Clone or download button) - unzip -a pybind11-master.zip
- cd pybind11-master
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
CMAKE_INSTALL_PREFIX /usr/pkg
PYBIND11_PYTHON_VERSION 2.7
PYBIND11_TEST OFF
press c, wait, press c, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- download pybind11-master.zip from https://github.com/pybind/pybind11
- Build and install pyside 1.2.2 group:
- download shiboken-1.2.2.tar.bz2, pyside-qt4.8+1.2.2.tar.bz2, pyside-tools-0.2.15.tar.gz from https://wiki.qt.io/PySide_Downloads
- build and install shiboken
- install libxslt package using the command pkg_add libxslt
- gtar -jxf shiboken-1.2.2.tar.bz2
- cd shiboken-1.2.2
- Replace with
Code: Select all
#define __STDC__
in ApiExtractor/parser/rpp/pp-qt-configurationCode: Select all
#define __STDC__ 1
- insert Code1 (Code1 is at the bottom of this instruction) at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg (it is needed for python search path)
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- build and install pyside-qt4.8
- gtar -jxf pyside-qt4.8+1.2.2.tar.bz2
- cd pyside-qt4.8+1.2.2
- insert Code1 (Code1 is at the bottom of this instruction) at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait - set variables (pyside uses shiboken in some way)
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- build and install pyside-tools
- gtar -zxf Tools-0.2.15.tar.gz
- cd Tools-0.2.15
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait - set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install Pivy
- download Coin3D-pivy-db2e64a4a880.zip from https://bitbucket.org/Coin3D/pivy/downloads/
- unzip -a Coin3D-pivy-db2e64a4a880.zip
- cd Coin3D-pivy-db2e64a4a880
- python2.7 setup_old.py build
- python2.7 setup_old.py install
- Build and install VTK
- install hdf5 package using the command pkg_add hdf5
- download VTK-7.1.1.tar.gz from https://vtk.org/download/
- gtar -zxf VTK-7.1.1.tar.gz
- cd VTK-7.1.1
- add to 38 line in IO/LSDyna/private/LSDynaFamily.cxx file
Code: Select all
&& !defined(__NetBSD__)
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
VTK_PYTHON_VERSION 2.7
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install MED
- download med-3.0.7.tar.gz from https://forge.scilab.org/index.php/p/me ... tallation/
- gtar -zxf med-3.0.7.tar.gz
- cd med-3.0.7
- insert Code1 at the beginnig of CMakeLists.txt
- replace with
Code: Select all
MEDequivInfo(int fid, char *maa, int ind, char *eq, char *des)
in src/2.3.6/ci/MEDequivInfo.cCode: Select all
MEDequivInfo(med_idt fid, char *maa, int ind, char *eq, char *des)
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -L/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 -R/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install freecad 0.17
- download FreeCAD-0.17.tar.gz from https://github.com/FreeCAD/FreeCAD/releases/tag/0.17
- gtar -zxf FreeCAD-0.17.tar.gz
- remove ^M dos signs from archive:
pack FreeCAD-0.17 directory to FreeCAD-0.17.zip using the command zip -r FreeCAD-0.17.zip FreeCAD-0.17
rm -r FreeCAD-0.17
unzip -a FreeCAD-0.17.zip
rm FreeCAD-0.17.zip - cd FreeCAD-0.17
- change to
Code: Select all
python
at 25 line in src/Mod/Path/libarea/CMakeLists.txt.Code: Select all
python27
If you don't do it, you will get error then:
Could not find the following Boost libraries:
boost_python - add at 60 line
Code: Select all
&& !defined(__NetBSD__)
addat 84 line in src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cppCode: Select all
|| defined(__NetBSD__)
- replace
with
Code: Select all
mib[1] = KERN_PROC; mib[2] = KERN_PROC_PATHNAME; mib[3] = -1;
in src/App/Application.cppCode: Select all
mib[1] = KERN_PROC_ARGS; mib[2] = -1; mib[3] = KERN_PROC_PATHNAME;
- there is a bug in FreeCAD-0.17.tar.gz source code related to https://www.freecadweb.org/tracker/view.php?id=3478. But fix https://github.com/FreeCAD/FreeCAD/commit/4f5e304d6 was only aplied to FreeCAD 0.18. For this reason you must follow:
- replace line 344
with
Code: Select all
PyObject* unicode = PyUnicode_AsLatin1String(value);
in src/App/DocumentPyImp.cppCode: Select all
PyObject* unicode = PyUnicode_AsUTF8String(value);
- replace line 274
with
Code: Select all
FreeCADGui.doCommand('base=FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject","'+translate('Arch','WallTrace')+'")')
in src/Mod/Arch/ArchWall.pyCode: Select all
FreeCADGui.doCommand('base=FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject","WallTrace")')
- replace line 344
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
BUILD_START OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
MpidotH /usr/pkg/include/mpi.h
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include -L/usr/X11R7/lib
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Run command: unset PKG_PATH
- Run command: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11R7/lib
- Add line: to your .profile file.
Code: Select all
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11R7/lib
- Try run FreeCAD using the command: FreeCAD &
APPENDIX
Code: Select all
#Code 1 (Always full RPATH)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib"
isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
#End of Code1
Re: Porting FreeCAD to BSD (NetBSD and cousins) and other stuff
This version with occt (Open Cascade Technology - Official Version) and without Start workbench (Start workbench does not work).
(Binary packages use /usr/pkg install prefix mostly. I installed other items in /usr/pkg too becasue of search python path.)
I made the following steps as root:
- Set path to binary packages repository from 8.0_2018Q3 release with command:
export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/package ... 2018Q3/All - Install binary packages:
pkg_add cmake
pkg_add gmake
pkg_add gtar
pkg_add ccache
pkg_add python27
pkg_add py27-matplotlib
pkg_add qt4
pkg_add boost
pkg_add doxygen
pkg_add eigen3
pkg_add xerces-c
pkg_add zlib
pkg_add Coin
pkg_add zip
pkg_add swig3 - Run commands:
export PATH=$PATH:/usr/pkg/qt4/bin
export QTDIR=/usr/pkg/qt4 - Build and install pybind11
- download pybind11-master.zip from https://github.com/pybind/pybind11
(Clone or download button) - unzip -a pybind11-master.zip
- cd pybind11-master
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
CMAKE_INSTALL_PREFIX /usr/pkg
PYBIND11_PYTHON_VERSION 2.7
PYBIND11_TEST OFF
press c, wait, press c, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- download pybind11-master.zip from https://github.com/pybind/pybind11
- Build and install pyside 1.2.2 group:
- download shiboken-1.2.2.tar.bz2, pyside-qt4.8+1.2.2.tar.bz2, pyside-tools-0.2.15.tar.gz from https://wiki.qt.io/PySide_Downloads
- build and install shiboken
- install libxslt package using the command pkg_add libxslt
- gtar -jxf shiboken-1.2.2.tar.bz2
- cd shiboken-1.2.2
- Replace with
Code: Select all
#define __STDC__
in ApiExtractor/parser/rpp/pp-qt-configurationCode: Select all
#define __STDC__ 1
- insert Code1 (Code1 is at the bottom of this instruction) at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg (it is needed for python search path)
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- build and install pyside-qt4.8
- gtar -jxf pyside-qt4.8+1.2.2.tar.bz2
- cd pyside-qt4.8+1.2.2
- insert Code1 (Code1 is at the bottom of this instruction) at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait - set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- build and install pyside-tools
- gtar -zxf Tools-0.2.15.tar.gz
- cd Tools-0.2.15
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait - set variables
BUILD_TESTS OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include
press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install Pivy
- download Coin3D-pivy-db2e64a4a880.zip from https://bitbucket.org/Coin3D/pivy/downloads/
- unzip -a Coin3D-pivy-db2e64a4a880.zip
- cd Coin3D-pivy-db2e64a4a880
- python2.7 setup_old.py build
- python2.7 setup_old.py install
- Build and install VTK
- install hdf5 package using the command pkg_add hdf5
- download VTK-7.1.1.tar.gz from https://vtk.org/download/
- gtar -zxf VTK-7.1.1.tar.gz
- cd VTK-7.1.1
- add to 38 line in IO/LSDyna/private/LSDynaFamily.cxx file
Code: Select all
&& !defined(__NetBSD__)
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
VTK_PYTHON_VERSION 2.7
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install OpenCascade:
- download https://git.dev.opencascade.org/gitweb/ ... 6f0;sf=tgz
- gtar -zxf occt-e1c1585.tar.gz
- cd occt-e1c1585
- insert Code1 at the beginnig of CMakeLists.txt
- add to 26 line in src/OSD/OSD_Path.cxx
Code: Select all
|| defined(__NetBSD__)
- insert
at 33 line into src/DrawResources/InitEnvironment.tcl
Code: Select all
} elseif { [ regexp NetBSD $LINE_FROM_UNAME ] } { return "bsd"
- add to 54 line in src/OSD/OSD_Chronometer.cxx
Code: Select all
|| defined(__NetBSD__)
- insert
at 74 line
Code: Select all
if (!strcmp(info.sysname,"NetBSD")) return (OSD_UnixBSD);
insertat 156 line into src/OSD/OSD_Host.cxxCode: Select all
if (!strcmp(info.sysname,"NetBSD")) return (OSD_LIN);
- add to 83 line in src/Standard/Standard_CString.cxx
Code: Select all
&& !defined(__NetBSD__)
- add to 252 line in src/Standard/Standard_MMgrOpt.cxx
Code: Select all
|| defined(__NetBSD__)
- to avoid -ldl errors delete line with from src/TKernel/EXTERNLIB file
Code: Select all
CSF_dl
- mkdir build
- cd build
- ccmake ..
press c, wait - set variables
INSTALL_DIR /usr/pkg
USE_VTK ON
press t
CMAKE_CXX_FLAGS -L/usr/X11R7/lib -I/usr/X11R7/include
press c, wait, press c, wait, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Build and install MED
- download med-3.0.7.tar.gz from https://forge.scilab.org/index.php/p/me ... tallation/
- gtar -zxf med-3.0.7.tar.gz
- cd med-3.0.7
- insert Code1 at the beginnig of CMakeLists.txt
- replace with
Code: Select all
MEDequivInfo(int fid, char *maa, int ind, char *eq, char *des)
in src/2.3.6/ci/MEDequivInfo.cCode: Select all
MEDequivInfo(med_idt fid, char *maa, int ind, char *eq, char *des)
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
press t
CMAKE_CXX_FLAGS -L/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2 -R/usr/pkg/lib/gcc-lib/x86_64--netbsd/4.1.2
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
gmake install
- Build and install FreeCAD 0.17
- download FreeCAD-0.17.tar.gz from https://github.com/FreeCAD/FreeCAD/releases/tag/0.17
- gtar -zxf FreeCAD-0.17.tar.gz
- remove ^M dos signs from archive:
pack FreeCAD-0.17 directory to FreeCAD-0.17.zip using the command zip -r FreeCAD-0.17.zip FreeCAD-0.17
rm -r FreeCAD-0.17
unzip -a FreeCAD-0.17.zip
rm FreeCAD-0.17.zip - delete zip package using command pkg_delete zip
- cd FreeCAD-0.17
- change to
Code: Select all
python
at 25 line in src/Mod/Path/libarea/CMakeLists.txt.Code: Select all
python27
If you don't do it, you will get error then:
Could not find the following Boost libraries:
boost_python - add at 60 line
Code: Select all
&& !defined(__NetBSD__)
- add at 84 line in src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
Code: Select all
|| defined(__NetBSD__)
- replace
with
Code: Select all
mib[1] = KERN_PROC; mib[2] = KERN_PROC_PATHNAME; mib[3] = -1;
in src/App/Application.cppCode: Select all
mib[1] = KERN_PROC_ARGS; mib[2] = -1; mib[3] = KERN_PROC_PATHNAME;
- there is a bug in FreeCAD-0.17.tar.gz source code related to https://www.freecadweb.org/tracker/view.php?id=3478. But fix https://github.com/FreeCAD/FreeCAD/commit/4f5e304d6 was only aplied to FreeCAD 0.18. For this reason you must follow:
replace line 344withCode: Select all
PyObject* unicode = PyUnicode_AsLatin1String(value);
in src/App/DocumentPyImp.cppCode: Select all
PyObject* unicode = PyUnicode_AsUTF8String(value);
replace line 274withCode: Select all
FreeCADGui.doCommand('base=FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject","'+translate('Arch','WallTrace')+'")')
src/Mod/Arch/ArchWall.pyCode: Select all
FreeCADGui.doCommand('base=FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject","WallTrace")')
- insert Code1 at the beginnig of CMakeLists.txt
- mkdir build
- cd build
- ccmake ..
press c, wait, press e - set variables:
BUILD_START OFF
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX /usr/pkg
FREECAD_USE_OCC_VARIANT Official Version
OCC_INCLUDE_DIR /usr/pkg/include/opencascade
press c, wait, press e
MpidotH /usr/pkg/include/mpi.h
press t
CMAKE_CXX_FLAGS -I/usr/X11R7/include -L/usr/X11R7/lib
press c, wait, press e, press g - gmake -jn, place number of processors or number of cores of processor in your computer insted of n
- gmake install
- Run command: unset PKG_PATH
- Run command: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11R7/lib
- Add line: export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/X11R7/lib
to your .profile file. - Try run FreeCAD using the command: FreeCAD &
Code: Select all
#Code 1 (Always full RPATH)
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib"
isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
#End of Code1