Welcome! Log In Create A New Profile

Advanced

OS X Compile Issues

Posted by labmat 
OS X Compile Issues
January 16, 2011 01:45PM
Hello All,

I'm trying to get my new Mendel with RAMPS up and running and was told RepSnapper was pretty cool so I thought I'd try it out but I'm having troubles compiling the latest RepSnapper I get the following error.

ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [repsnapper] Error 1


I'm a mechanical engineer by training and know just enough to get frustrated confused smiley but this is beyond my area of expertise.

I've attached the terminal window commands, anyone have any ideas?

Thanks,
Matthew LaBerge
Attachments:
open | download - RepSnapper.txt (85.2 KB)
Re: OS X Compile Issues
January 17, 2011 08:48AM
Does anyone have any idea where to look? I am clueless and could really use some help.
Re: OS X Compile Issues
January 17, 2011 04:04PM
I would suggest getting this precompiled binary: [sites.google.com] If it crashed when you connect, try running it from the command line (I have to do this and no idea why) with this command: /Applications/RepSnapper.app/Contents/MacOS/repsnapper

I was able to compile it from source, but it was a pain and didn't work quite right. That pre-compiled version works well enough for me.


--
Tony Buser http://tonybuser.com * http://reprap.org/wiki/User:Tbuser#Projects
Re: OS X Compile Issues
January 21, 2011 03:21AM
labmat Wrote:
-------------------------------------------------------
> Hello All,
>
> I'm trying to get my new Mendel with RAMPS up and
> running and was told RepSnapper was pretty cool so
> I thought I'd try it out but I'm having troubles
> compiling the latest RepSnapper I get the
> following error.
>
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** Error 1

The culprits are buried deep inside your log:
g++ -I/opt/local/include -I../libraries/vmmlib/include -I../libraries -I../libraries/polylib -pthread repsnapper.o asyncserial.o stl.o reprapserial.o processcontroller.o printer.o modelviewcontroller.o gllight.o gcode.o arcball.o stdafx.o ui.o rfo.o flu_dnd.o flu_pixmaps.o flu_simplestring.o flu_tree_browser.o ivcon.o file.o platform.o -L/opt/local/lib -pthread -lfltk -lfltk_forms -lfltk_gl -lconfig++ -lboost_thread-mt -lboost_system-mt -L../libraries/polylib -lpolylib -framework Carbon -framework OpenGL -framework GLUT -framework AGL -o repsnapper

[...]
ld: warning: in /opt/local/lib/libfltk.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libfltk_forms.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/libfltk_gl.dylib, file is not of required architecture

The problem is that MacPorts builds libfltk as 32-bit only, and by default, g++ (and gcc) will compile binaries as 64-bit on SnowLeopard unless you pass -arch i386 to the compiler. There's a note to this effect on [sites.google.com], but it's hardly clear.

You may run into further problems using the MacPort libraries, unless you make sure that all libraries are built with 32-bit versions using the +universal variant. I need to give this all a try myself, but compiling all the dependencies is a royal pain.
Sorry, only registered users may post in this forum.

Click here to login