Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mxebuild fix #235

Merged
merged 70 commits into from Jan 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
d57029a
fix bug where if $MXEDIR didn't already exist, build failed
donbright Dec 3, 2012
f07edc4
allow 'mingw32' option. dont use OSTYPE. fix docs. allow NUMCPU multi…
donbright Dec 3, 2012
b641397
fix tabs in svg.cc
donbright Dec 3, 2012
0778a55
actually assign copyright to Marius + Clifford, to eliminate any
donbright Dec 3, 2012
406bf8a
clarify mingw32 usage in docs & in 'print usage'
donbright Dec 3, 2012
5624a0e
hand code html to remove qt cruft. makes it easier to change, and easier
donbright Dec 4, 2012
29c22aa
tidy up html for QTextBrowser. add shortcut for 'help'
donbright Dec 4, 2012
fcaa481
move flattr image to right-hand side.
donbright Dec 4, 2012
03ef1a2
unify build scripts. introduce 'version checker' script. simplify ins…
donbright Dec 5, 2012
2eb1842
do not use OSTYPE, its a read-only operating system variable
donbright Dec 20, 2012
29c3699
clarify README linux compilation
donbright Dec 20, 2012
f5cb2ec
enable 'out of tree' call of dependency scripts. fix old ubuntu detec…
donbright Dec 20, 2012
67ba3cb
for out of tree, build under $PWD/openscad_deps not $PWD
donbright Dec 20, 2012
bbcc2a0
update boost version. allow 'out of tree' dependency check. fix cmake…
donbright Dec 20, 2012
d80b067
convert tabs to spaces. fix some BSD problems
donbright Dec 20, 2012
10f16df
skip broken opengl testing under eigen3
donbright Dec 20, 2012
f95fa0d
change 'system' to 'found' in header of printed table
donbright Dec 20, 2012
2a612b5
improve qt version detection
donbright Dec 20, 2012
208be52
improve OpenCSG build to use qmake + work better standalone
donbright Dec 20, 2012
76923eb
CGAL<4.0.2 has strange errors with clang. notify user explicitly to u…
donbright Dec 20, 2012
799bb20
mention BSD. clarify language slightly
donbright Dec 20, 2012
238cf85
fixes for netbsd. clarify readme.
donbright Dec 20, 2012
89f3b31
warn user about old local copies of libraries
donbright Dec 20, 2012
596fe62
deal with hurd
donbright Dec 21, 2012
ced98a7
fix bug detecting if CGAL was already downloaded. simplify some wording
donbright Dec 21, 2012
0de7357
clarify README for linux/bsd build, streamline 'get-depdendencies' sc…
donbright Dec 21, 2012
43e1d61
download and build bison if needed. detect better on BSD
donbright Dec 21, 2012
aeefc1f
dont rebuild dependencies that are already built/installed
donbright Dec 21, 2012
b925540
improve handling of clang for glew build
donbright Dec 21, 2012
8b0ced0
glew fixes for clang and for hurd
donbright Dec 21, 2012
1a399e7
document 'out of tree' dependency build. fix opencsg on netbsd
donbright Dec 21, 2012
b43cee7
opensuse - get bison/flex
donbright Dec 21, 2012
d8ecb14
deal with black-on-white terminals. opencsg:dont copy lib/.libs if no…
donbright Dec 21, 2012
a75743f
update README to show how to build only opencsg/cgal dependencies
donbright Dec 21, 2012
ef72f6f
fix slight bug in cgal build
donbright Dec 21, 2012
bb31729
revise ubuntu / debian detection, dont try to detect version. check l…
donbright Dec 21, 2012
b1ecf35
remove debug line
donbright Dec 21, 2012
870f3dc
deal with situation where gcc doesnt exist. add mageia urpmi commands…
donbright Dec 21, 2012
e3ea506
add libglew-dev to mageia
donbright Dec 21, 2012
cdc4083
NetBSD deps. also detect stray copies of libraries under /usr/local o…
donbright Dec 21, 2012
fac239c
stop apt-get from failing on unfound package names
donbright Dec 21, 2012
0f72b11
deal with unknown system type better. remove 'tested on' messages
donbright Dec 21, 2012
f3cd856
netbsd fixes
donbright Dec 23, 2012
e52787b
make glew min 1.5.4 (its OK). fix glew + gcc detection. more debuggin…
donbright Dec 23, 2012
f1e2235
dont test for git, curl. they arent strictly needed for build
donbright Dec 23, 2012
91cec82
fixes for Alt Linux
donbright Dec 23, 2012
2367db3
netbsd - ask user to verify X Sets are installed
donbright Dec 23, 2012
7be00e4
more alt linux fixes
donbright Dec 23, 2012
9deb7de
CONFIG=skip_version_check should be += otherwise qmake has bizarre pr…
donbright Dec 23, 2012
ad45e8a
detect netbsd / freebsd after linux not before, for bison/flex.
donbright Dec 23, 2012
bdfbcdf
improve Gcc version detection
donbright Dec 25, 2012
b39b2ba
fixing g++ version detection
donbright Dec 25, 2012
6693c3b
fix eigen detection bug i introduced yesterday
donbright Dec 25, 2012
3c9f36e
path instructions should be / not ./
donbright Dec 25, 2012
fb6d7f9
fix clang build on glew. add some documentation.
donbright Dec 25, 2012
51259e6
Merge branch 'mxebuild_fix' of github.com:openscad/openscad into mxeb…
donbright Dec 25, 2012
4cc6e2a
a workaround for LD_LIBRARY_PATH having to be set every time you want to
donbright Dec 25, 2012
7afcc41
prevent LD_LIBRARY_PATH problems on unix (not OSX) systems with
donbright Dec 29, 2012
ed97940
make RPATH work on uni-build-dependencies with GLEW on 64 bit machines
donbright Dec 29, 2012
41269ec
simplify README a little bit on build process
donbright Dec 29, 2012
2230b3c
qmake-macx last detected on eigen. (unix=1 on osx). clarify comments.
donbright Dec 29, 2012
b753e41
cleaning up
donbright Dec 29, 2012
70d810b
cleanup
donbright Dec 29, 2012
da9c943
remove detection via package system, complicated + doesnt work well
donbright Dec 29, 2012
728f00d
clarify comments
donbright Dec 29, 2012
413f22c
clarify comments and variable names in pretty print
donbright Dec 30, 2012
eeadeb2
clarify variable names. simplify.
donbright Dec 30, 2012
87f2d39
clarify comments
donbright Dec 30, 2012
158e760
clarify comments
donbright Dec 30, 2012
db9a78f
cleanup
donbright Dec 30, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
64 changes: 41 additions & 23 deletions README.md
Expand Up @@ -80,7 +80,7 @@ numbers in brackets specify the versions which have been used for
development. Other versions may or may not work as well.

If you're using a newer version of Ubuntu, you can install these
libraries from aptitude. If you're using Mac, or an older Linux, there
libraries from aptitude. If you're using Mac, or an older Linux/BSD, there
are build scripts that download and compile the libraries from source.
Follow the instructions for the platform you're compiling on below.

Expand All @@ -91,7 +91,7 @@ Follow the instructions for the platform you're compiling on below.
* [MPFR (3.x)](http://www.mpfr.org/)
* [boost (1.35 - 1.47)](http://www.boost.org/)
* [OpenCSG (1.3.2)](http://www.opencsg.org/)
* [GLEW (1.6 ->)](http://glew.sourceforge.net/)
* [GLEW (1.5.4 ->)](http://glew.sourceforge.net/)
* [Eigen (2.0.13->3.1.1)](http://eigen.tuxfamily.org/)
* [GCC C++ Compiler (4.2 ->)](http://gcc.gnu.org/)
* [Bison (2.4)](http://www.gnu.org/software/bison/)
Expand Down Expand Up @@ -131,34 +131,52 @@ compilation process.

After that, follow the Compilation instructions below.

### Building for newer Linux distributions
### Building for Linux/BSD

First, make sure that you have development tools installed to get GCC.
Then after you've cloned this git repository, use a package manager to
download packages for the dependency libraries listed above. Convenience
scripts are provided for some popular systems:
First, make sure that you have git installed (often packaged as 'git-core'
or 'scmgit'). Once you've cloned this git repository, download and install
the dependency packages listed above using your system's package
manager. A convenience script is provided that can help with this
process on some systems:

Ubuntu, Debian: ./scripts/ubuntu-build-dependencies.sh
OpenSUSE: ./scripts/opensuse-build-dependencies.sh
Fedora: ./scripts/fedora-build-dependencies.sh
./scripts/uni-get-dependencies.sh

Check your library versions to make sure they meet the minimum
requirements listed above. After that follow the Compilation
instructions below.
After installing dependencies, check their versions. You can run this
script to help you:

### Building for older Linux or building without root access
./scripts/check-dependencies.sh

First, make sure that you have development tools installed to get GCC.
Then after you've cloned this git repository, run the script that sets
up the environment variables.
Take care that you don't have old local copies anywhere (/usr/local/).
If all dependencies are present and of a high enough version, skip ahead
to the Compilation instructions.

source ./scripts/setenv-linbuild.sh
### Building for Linux/BSD on systems with older or missing dependencies

Then run the script to download & compile all the prerequisite libraries above:
If some of your system dependency libraries are missing or old, then you
can download and build newer versions into $HOME/openscad_deps by
following this process. First, run the script that sets up the
environment variables.

source ./scripts/setenv-unibuild.sh

Then run the script to compile all the prerequisite libraries above:

./scripts/uni-build-dependencies.sh

This may take an hour or more, depending on your network and system. It
is recommended to have at least 1 gigabyte of free disk space. As a
special timesaver if you are only missing CGAL and OpenCSG, you can do
this instead:

./scripts/uni-build-dependencies.sh opencsg
./scripts/uni-build-dependencies.sh cgal

Note that huge dependencies like gcc or qt are not included here, only
the smaller ones (boost, CGAL, opencsg, etc). After the build, again
check dependencies.

./scripts/linux-build-dependencies.sh
./scripts/check-dependencies.sh

Then add LD_LIBRARY_PATH=$HOME/openscad_deps to your ~/.bashrc
After that, follow the Compilation instructions below.

### Building for Windows
Expand All @@ -177,9 +195,9 @@ Then run the script to download & compile all the prerequisite libraries above:

./scripts/mingw-x-build-dependencies.sh

Then skip the compilation instructions below. Instead, build an installer:
Then, build OpenSCAD and package it to an installer:

OSTYPE=mingw-cross-env ./scripts/release-common.sh
./scripts/release-common.sh mingw32

### Compilation

Expand Down
25 changes: 17 additions & 8 deletions bison.pri
Expand Up @@ -17,17 +17,26 @@ win32 {
QMAKE_EXTRA_COMPILERS += bison_header
}

unix:freebsd-g++ {
# on bsd /usr/bin/bison is outdated, dont use it
QMAKE_YACC = /usr/local/bin/bison
unix:linux* {
exists(/usr/bin/bison) {
QMAKE_YACC = /usr/bin/bison
}
}

unix:netbsd* {
QMAKE_YACC = /usr/pkg/bin/bison
freebsd* {
# on some BSD, /usr/local/bin/bison is newer than
# /usr/bin/bison, so try to prefer it.
exists(/usr/local/bin/bison) {
QMAKE_YACC = /usr/local/bin/bison
} else { # look in $PATH
QMAKE_YACC = bison
}
}

unix:linux* {
exists(/usr/bin/bison) {
QMAKE_YACC = /usr/bin/bison
netbsd* {
exists(/usr/pkg/bin/bison) {
QMAKE_YACC = /usr/pkg/bin/bison
} else { # look in $PATH
QMAKE_YACC = bison
}
}
15 changes: 10 additions & 5 deletions eigen.pri
Expand Up @@ -48,14 +48,14 @@ CONFIG(mingw-cross-env) {

isEmpty(EIGEN_INCLUDEPATH) {
freebsd-g++: EIGEN_INCLUDEPATH = /usr/local/include/eigen3
macx: EIGEN_INCLUDEPATH = /opt/local/include/eigen3
linux*|hurd*: EIGEN_INCLUDEPATH = /usr/include/eigen3
netbsd*: EIGEN_INCLUDEPATH = /usr/pkg/include/eigen3
!exists($$EIGEN_INCLUDEPATH) {
linux*|hurd*|unix: EIGEN_INCLUDEPATH = /usr/include/eigen3
macx: EIGEN_INCLUDEPATH = /opt/local/include/eigen3
!exists(EIGEN_INCLUDEPATH) {
freebsd-g++: EIGEN_INCLUDEPATH = /usr/local/include/eigen2
macx: EIGEN_INCLUDEPATH = /opt/local/include/eigen2
linux*|hurd*: EIGEN_INCLUDEPATH = /usr/include/eigen2
netbsd*: EIGEN_INCLUDEPATH = /usr/pkg/include/eigen2
linux*|hurd*|unix*: EIGEN_INCLUDEPATH = /usr/include/eigen2
macx: EIGEN_INCLUDEPATH = /opt/local/include/eigen2
}
}

Expand All @@ -69,4 +69,9 @@ isEmpty(EIGEN_INCLUDEPATH) {
# EIGEN being under 'include/eigen[2-3]' needs special prepending
QMAKE_INCDIR_QT = $$EIGEN_INCLUDEPATH $$QMAKE_INCDIR_QT

# qmakespecs on netbsd prepend system includes, we need eigen first.
netbsd* {
QMAKE_CXXFLAGS = -I$$EIGEN_INCLUDEPATH $$QMAKE_CXXFLAGS
}

} # eigen
15 changes: 8 additions & 7 deletions flex.pri
Expand Up @@ -9,16 +9,17 @@ win32 {
QMAKE_EXTRA_COMPILERS += flex
}

unix:freebsd-g++ {
unix:linux* {
exists(/usr/bin/flex) {
QMAKE_LEX = /usr/bin/flex
}
}

freebsd* {
QMAKE_LEX = /usr/local/bin/flex
}

unix:netbsd* {
netbsd* {
QMAKE_LEX = /usr/pkg/bin/flex
}

unix:linux* {
exists(/usr/bin/flex) {
QMAKE_LEX = /usr/bin/flex
}
}
1 change: 0 additions & 1 deletion glew.pri
Expand Up @@ -6,7 +6,6 @@ glew {
QMAKE_INCDIR += $$GLEW_DIR/include
QMAKE_LIBDIR += $$GLEW_DIR/lib
QMAKE_LIBDIR += $$GLEW_DIR/lib64
message("GLEW location: $$GLEW_DIR")
}

unix:LIBS += -lGLEW
Expand Down
18 changes: 16 additions & 2 deletions openscad.pro
Expand Up @@ -90,14 +90,28 @@ unix:!macx {
}

netbsd* {
LIBS += -L/usr/X11R7/lib
QMAKE_LFLAGS += -L/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/pkg/lib
!isEmpty(OPENSCAD_LIBDIR) {
QMAKE_LFLAGS += -Wl,-R$$OPENSCAD_LIBDIR/lib
QMAKE_CFLAGS = -I$$OPENSCAD_LIBDIR/include $$QMAKE_CFLAGS
QMAKE_CXXFLAGS = -I$$OPENSCAD_LIBDIR/include $$QMAKE_CXXFLAGS
QMAKE_LFLAGS = -L$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
}
}

# Prevent LD_LIBRARY_PATH problems when running the openscad binary
# on systems where uni-build-dependencies.sh was used.
# Will not affect 'normal' builds.
!isEmpty(OPENSCAD_LIBDIR) {
unix:!macx {
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
# need /lib64 beause GLEW installs itself there on 64 bit machines
QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib64 $$QMAKE_LFLAGS
}
}

# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
*g++* {
QMAKE_CXXFLAGS *= -fno-strict-aliasing
Expand Down