SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

problem building on ubuntu (by Franz Reiter)
Hi,
tried to build solvespace-fltk-port on ubuntu 12.10 with:
touch NEWS README AUTHORS ChangeLog
aclocal
autoheader
autoconf
automake --force-missing --add-missing
./configure
------------------------ got:
./configure: line 5876: syntax error near unexpected token `1.3,'
./configure: line 5876: `AX_FLTK(1.3, --use-gl --use-images --use-forms)'

I have installed libfltk1.3-dev including libfltk-gl1.3.

What is missing, what can i do ?

I had to add "AC_PROG_RANLIB" into configure.ac for autoconf !

This is the first time to use automake for me; until now i installed from .deb-packages and (long ago) from .rpm's.

Franz
Thu Dec 19 2013, 02:55:07
Re: problem building on ubuntu (by Daniel Richard G.)
Hi Franz,

(I'm the author of the FLTK port.)

You should be able to bootstrap the build system just by running "./autogen.sh". Does that do the trick for you?
Fri Dec 20 2013, 13:44:42
solved .. (by Franz Reiter)
thanks; got it going,
Franz.

Maybe the following Readme would help other (Ubuntu-)users:

# install this:
sudo apt-get install libtool
sudo apt-get install libjpeg-dev
sudo apt-get install libfltk1.3-dev
# copy files into home:
cd ~
gunzip Downloads/solvespace-fltk-port-.....tar.gz
tar -xvf Downloads/solvespace-fltk-port-.....tar
cd ~/solvespace-fltk-port
# build
./autogen.sh
./configure
make
# start
cd
./solvespace-fltk-port/src/solvespace
Sun Dec 22 2013, 04:06:34
build the gtk-version (by Reiter Franz)
Hi,
i failed trying to build the gtk-version with:

touch NEWS README AUTHORS ChangeLog
aclocal
autoheader
autoconf
automake --add-missing
./configure

# her the errors are:
./configure: line 4242: AX_CHECK_GL: command not found
./configure: line 4246: AX_CHECK_GLU: command not found
./configure: line 4650: syntax error near unexpected token `GD'
./configure: line 4650: `AX_PERL_MODULE_VERSION(GD 2.46, , as_fn_error $? "GD is missing." "$LINENO" 5)'

- have installed many libgd-packages;
- whats wrong ? please help.

Franz
Sun Dec 22 2013, 05:01:47
Re: build the gtk-version (by Daniel Richard G.)
I don't think the GTK version of SolveSpace is ready for use. It may not even be in development anymore, seeing as the last commit was back in October.

Glad to see you were able to get the FLTK port built!
Sun Dec 22 2013, 19:20:10
Working in ubuntu 13.10 (by Juan-Carlos FUREST)
Hi,
I'm giving a try to SolveSpace under Ubuntu.
The compilation of the FLTK port went perfectly.
I could create a sketch but couldn't extrude it. I've got a segfault.
Is that a issue from the port or from the core?

Juan-Carlos
Mon Dec 23 2013, 05:07:10
Linux - segfault (by Franz Reiter)
Hi,
have the same problem: segfault with extrude.
Here is the debug-session;
a and b in srf/boolean.cpp:875 are invalid;
cannot solve the problem (c++ is tooo tricky);
Franz


Program received signal SIGSEGV, Segmentation fault at:
875 double dea = ScaledSignedDistanceToLine(ea, a, b, srf),
#0 SBspUv::InsertEdge (this=0x7600000076b10000, ea=..., eb=...,
[email protected]=0x2abea70) at srf/boolean.cpp:875
#1 0x000000000047f77e in SBspUv::InsertEdge ([email protected]=0x2a87150,
ea=..., eb=..., [email protected]=0x2abea70) at srf/boolean.cpp:900
#2 0x000000000047fcd5 in SBspUv::From ([email protected]=0x7ffffffe62b0,
[email protected]=0x2abea70) at srf/boolean.cpp:824
#3 0x000000000047fd78 in SSurface::MakeClassifyingBsp (
[email protected]=0x2abea70, [email protected]=0x7ffff0822760,
[email protected]=0x0) at srf/boolean.cpp:789
#4 0x000000000047fe08 in SShell::MakeClassifyingBsps (
[email protected]=0x7ffff0822760, [email protected]=0x0)
at srf/boolean.cpp:780
#5 0x0000000000482b03 in SShell::MakeFromBoolean (this=0x7ffff0822788,
a=0x7ffff080d488, b=0x7ffff0822760, type=10) at srf/boolean.cpp:727
#6 0x0000000000455601 in GenerateForBoolean<SShell> (how=0,
outs=0x7ffff0822788, thiss=0x7ffff0822760, prevs=0x7ffff080d488,
this=<optimized out>) at groupmesh.cpp:174
#7 Group::GenerateShellAndMesh (this=0x7ffff0822610) at groupmesh.cpp:323
#8 0x00000000004499ac in SolveSpace::GenerateAll (this=0x77d4e0 <SS>,
first=2, last=2, andFindFree=false) at generate.cpp:266


------- srf/boolean.cpp:875 double dea = ScaledSignedDistanceToLine(ea, a, b, srf),
(gdb) p ea
$1 = {x = 0.85355339059327406, y = 0.14644660940602666}
(gdb) p a
Cannot access memory at address 0x7600000076b10000
(gdb) p b
Cannot access memory at address 0x7600000076b10010
(gdb) p srf
$2 = (SSurface *) 0x2abea70

------- srf/boolean.cpp:900 pos = pos->InsertEdge(ea, eb, srf);
(gdb) p ea
$3 = {x = 0.85355339059327406, y = 0.14644660940602666}
(gdb) p eb
$4 = {x = 0.68404735478093626, y = 0.035105849468616959}
(gdb) p srf
$5 = (SSurface *) 0x2abea70
Mon Dec 23 2013, 10:57:28
(no subject) (by Jonathan Westhues)
I'm afraid that I haven't personally verified anything more than that these changes don't break the Windows build, so I can't immediately comment. Perhaps Daniel will have a suggestion.

If you're just trying to use SolveSpace under Linux, then it's probably easiest for now to run the Windows executable under WINE. A number of people are doing that and report success, so that should be generally robust.
Sun Dec 29 2013, 04:19:17
Linux fltk-prt fixes (by Xavier Thomas)
Hi,

I tried to compile install the fltk-port branch under Debian an got some errors.

First I could not build with my version of autotools, I had t modify the configure.ac file to include the subdir-objects option.

Second I had segmentation faults in the 2d binary space partitioning code while creating the mesh for rendering solid. this is certainly the same error that Juan-Carlos FUREST and Franz Reiter had when extruding.

Basically it is due te the use of uninitialized variables (SBspUv.pos, SBspUv.neg and SBspUv.more in this case) but after correcting it i get other similar errors. All errors are due to code using uninitialized pointer assuming they are NULL. So to avoid hours of debugging a lots of small corrections all over the place, I just modified the Linux heap allocator code to set memory to 0 when allocating it. This is not the most clean and optimum way to fix the bug in my opinion but it is the easiest.

The patch follows, please be free to include it upstream.


diff --git a/configure.ac b/configure.ac
index 0813f79..ccfdca3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR([src/solvespace.cpp])
AC_CONFIG_AUX_DIR([ac-aux])
AC_CONFIG_MACRO_DIR([ac-aux])

-AM_INIT_AUTOMAKE([1.9.6 foreign tar-ustar])
+AM_INIT_AUTOMAKE([1.9.6 foreign tar-ustar subdir-objects])
AM_MAINTAINER_MODE

AC_PROG_CC
diff --git a/src/fltk/fltkutil.cpp b/src/fltk/fltkutil.cpp
index b35a251..337c37b 100644
--- a/src/fltk/fltkutil.cpp
+++ b/src/fltk/fltkutil.cpp
@@ -55,8 +55,13 @@ static AllocTempHeader *Head = NULL;

void *AllocTemporary(size_t n)
{
- AllocTempHeader *h =
- (AllocTempHeader *)malloc(n + sizeof(AllocTempHeader));
+ size_t totsize = n + sizeof(AllocTempHeader);
+
+ AllocTempHeader *h = (AllocTempHeader *)malloc(totsize);
+
+ // Lot of the code assume the memory is set to 0
+ memset(h, 0, totsize);
+
h->prev = NULL;
h->next = Head;
Head = h;
Sat Apr 12 2014, 10:45:26
(no subject) (by Jonathan Westhues)
Thanks. I independently received those changes from Ilya Novoselov, and they are present in the head revision of master at gitorious; let me know if you see any problems.
Sat Apr 12 2014, 15:37:06
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.