Compiling on linux

456 views
Skip to first unread message

dgorissen

unread,
Jan 16, 2012, 10:56:18 AM1/16/12
to OpenVSP
Hello,

Great news on releasing OpenVSP as open source. Wanted to play around
but having some problems compiling it under Ubuntu Maverick (not the
most recent distro I know):

[ 66%] Building CXX object vsp/CMakeFiles/vsp.dir/scriptMgr.o
/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp: In member
function ‘void ScriptMgr::save(const
char*)’:
/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp:61: warning:
format not a string literal and no format arguments
/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp: In member
function ‘void ScriptMgr::scriptCB(int, int, int, int, const char*)’:

/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp:147: error:
‘class Fl_Text_Buffer’ has no member named ‘char_at’

/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp: In member
function ‘void ScriptMgr::appendError(const char*)’:
/home/dgorissen/github/OpenVSP/src/vsp/scriptMgr.cpp:185: warning:
format not a string literal and no format arguments
make[2]: *** [vsp/CMakeFiles/vsp.dir/scriptMgr.o] Error 1
make[1]: *** [vsp/CMakeFiles/vsp.dir/all] Error 2
make: *** [all] Error 2

Seems to be a problem with fltk, my version is 1.1, too old?

Cheers
Dirk

Rob McDonald

unread,
Jan 16, 2012, 11:36:42 AM1/16/12
to ope...@googlegroups.com
On Mon, Jan 16, 2012 at 7:56 AM, dgorissen <dirk.g...@soton.ac.uk> wrote:
> Hello,

>
> Seems to be a problem with fltk, my version is 1.1, too old?
>

That would be my first guess. Everything I've done lately has been
against FLTK 1.3.0.

Linux build instructions are a real point of weakness right now. I
would really appreciate if you could add your lessons learned to the
Wiki as you figure it out.

Rob

Randy Reynolds

unread,
Jan 16, 2012, 7:52:16 PM1/16/12
to OpenVSP
Using fltk 1.3 I got the same error, I had to add Fast Light Toolkit -
development files (libfltk1.3-dev)

And it works great so far..

This was done on a 11.10 i386 on a Oracle VM

Ögmundur

unread,
Jan 17, 2012, 5:57:54 PM1/17/12
to OpenVSP
Hi,

I just compiled on Ubuntu 11.10 (Oneiric Ocelot). Simply followed the
instructions on https://github.com/OpenVSP/OpenVSP without any
problems. The short version is as follows:

Make sure you have:

libjpeg8-dev
libfltk1.3-dev

installed (can be found in Synaptic or installed directly using apt-
get). Download openNURBS from http://www.opennurbs.org/ and extract
the contents of the archive to src/opennurbs. Build openNURBS:

cd src/opennurbs
make

I had some errors building the examples but this doesn't seem to
matter.

Create a directory called build on the same level as src and enter the
following to create the build files:

cd build
cmake ../src

If you get the following text at the end:

-- Generating done
-- Build files have been written to: /full/path/to/OpenVSP/build

Your are all set, just type make and your vsp executable will appear
in the vsp subdirectory. If cmake complains about libraries it cannot
find, look for them in Synaptic and install the development versions.

Hope this helps,
Ögmundur

Nathan Alday

unread,
Jan 17, 2012, 9:59:30 PM1/17/12
to OpenVSP
I've add Ubuntu 11.10 install instructions (for a fresh Ubuntu
install) to the wiki at http://www.openvsp.org/wiki/doku.php?id=installation_on_ubuntu_11.10.
I've also added a script that should automagically do the install. I
put it directly into to the wiki at
http://www.openvsp.org/wiki/doku.php?id=install_script_for_ubuntu_11.10.
Both of these pages are linked from the "Install" page.

--Nathan

On Jan 16, 10:36 am, Rob McDonald <rob.a.mcdon...@gmail.com> wrote:

Rob McDonald

unread,
Jan 17, 2012, 11:17:23 PM1/17/12
to ope...@googlegroups.com
Thanks very much to everyone for helping to work through that and make
the process very clear.

Nathan, I noticed that you enumerated a few dependencies which weren't
listed in the README.

I don't know why those were in there -- unless they are all implied by
FLTK in some way. Were there any clues when they cropped up?

Rob

dgorissen

unread,
Jan 18, 2012, 8:19:56 AM1/18/12
to OpenVSP
Thanks, just to confirm, upgrading to 1.3 does the trick.
Cheers
Dirk

On Jan 16, 4:36 pm, Rob McDonald <rob.a.mcdon...@gmail.com> wrote:

Nathan Alday

unread,
Jan 18, 2012, 9:51:49 AM1/18/12
to ope...@googlegroups.com
They popped up in the linking stage. So we shouldn't need the -dev versions, I did that out of habit. I believe they're mostly FLTK related: a PNG library, Freetype fonts (libxft2), and Xinerama: "is an extension to the X Window System which enables multi-headed X applications and window managers to use two or more physical displays as one large virtual display." (I snuck past the Wikipedia blackout.)

--Nathan

rdeckerwy

unread,
Feb 27, 2012, 4:50:18 PM2/27/12
to OpenVSP
Looks like you can get OpenVSP to build with FLTK version 1.1 if you
change line 147 of src/vsp/scriptMgr.cpp from

else if (nInserted == 1 && scriptBuffer->char_at(pos) == '\n')

to

else if (nInserted == 1 && scriptBuffer->character(pos) == '\n')

Rob McDonald

unread,
Feb 28, 2012, 12:38:04 AM2/28/12
to ope...@googlegroups.com
You are correct, I believe that change (in reverse of course) was all
that was required to upgrade from FLTK 1.1 to 1.3.

We moved to FLTK 1.3 to try to address some hard to pin-down bugs and
also because of its improved native support of Cocoa for MacOS. FLTK
1.3 includes some features we may rely on down the road, so this fix
may not be a great long-term solution for you.

FL_Tree and FL_Native_Filechooser are the two candidates which are
obvious for consideration.

That said, 1.3 was only made final on 6/16/11 (
http://www.fltk.org/articles.php?L1086 ), so it is not surprising that
some Linux distributions haven't made the switch yet.

Rob

Michael Kruger

unread,
Oct 13, 2014, 3:22:17 AM10/13/14
to ope...@googlegroups.com, dirk.g...@soton.ac.uk
Hi guys, not sure if this group is still active.


But get the following error during the final step of the compilation:

/usr/bin/ld: cannot find -lopenNURBS
/usr/bin/ld: cannot find -lopenNURBS
collect2: error: ld returned 1 exit status
make[2]: *** [vsp/vsp] Error 1
make[1]: *** [vsp/CMakeFiles/vsp.dir/all] Error 2
make: *** [all] Error 2

Any suggestions?

Disclaimer: I'm a aeros engineering student not a programmer, so would appreciate step-by-step advice (-:

Rob McDonald

unread,
Oct 13, 2014, 11:14:26 AM10/13/14
to ope...@googlegroups.com
On Mon, Oct 13, 2014 at 12:22 AM, Michael Kruger
<michael...@gmail.com> wrote:
> Hi guys, not sure if this group is still active.
>
> I used this install script:
> http://www.openvsp.org/wiki/doku.php?id=install_script_for_ubuntu_11.10
>
> But get the following error during the final step of the compilation:
>
> /usr/bin/ld: cannot find -lopenNURBS
> /usr/bin/ld: cannot find -lopenNURBS
> collect2: error: ld returned 1 exit status
> make[2]: *** [vsp/vsp] Error 1
> make[1]: *** [vsp/CMakeFiles/vsp.dir/all] Error 2
> make: *** [all] Error 2
>
> Any suggestions?
>
> Disclaimer: I'm a aeros engineering student not a programmer, so would
> appreciate step-by-step advice (-:

Me too.

It looks like that script has a process to build the OpenNURBS
library, but then it doesn't install it where the OpenVSP build
process can find it.

You should probably go to the directory where the script ran 'make'
for OpenNURBS and then do some form of 'sudo make install'.

Rob

Michael Kruger

unread,
Oct 17, 2014, 3:57:47 AM10/17/14
to ope...@googlegroups.com, dirk.g...@soton.ac.uk
Thank you Rob, I will give it a try!


On Monday, January 16, 2012 5:56:18 PM UTC+2, dgorissen wrote:
Reply all
Reply to author
Forward
0 new messages