Compiling an app from Sourceforge

Discussion in 'Mac Programming' started by ThatSoundAgain, Jan 11, 2006.

  1. ThatSoundAgain macrumors member

    Apr 10, 2005

    I'm really interested in running this app that I found on sourceforge. (source).

    It says it's for "All POSIX (Linux/BSD/UNIX-like OSes)".

    However, I lack the expertise to compile it. I've tried the instructions that comes with the source, but I get errors. Particularly "make install" gives me: "nothing to be done for install."

    What does it require to compile such an app? Is there a guide somewhere to compiling and installing UNIX-like programs?

    Thanks in advance!
  2. mwpeters8182 macrumors 6502

    Apr 16, 2003
    Boston, MA
    When you ran the configure script, did it give you any errors? the output from ./configure might be useful to see what's gone wrong.
  3. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    Just an aside (as you're interested in 3D stuff). Have you had a look at Blender ( It's free, open-source and has a pre-built binary for Mac OS X.
  4. AlmostThere macrumors 6502a

    From the README:
    Which very strongly suggests that need an Intel processor ... that new iMac arrived already?

    Secondly, from having spent 15 minutes trying to compile this app, which does look quite cool, it seems that many of the dependencies have not yet been updated on fink (which I generally use for Unix libraries). There is a good chance there are a large number of libraries you need to compile in addition to this app alone (assuming the author has handled all SSE dependencies). I compiled a couple but they just keep coming.

    I don't think this is an easy task to build on OS X and probably needs proper porting.
  5. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005
    No, I'm on a last-gen 15" G4 PB. I took that section of the readme as a recommendation for a bare minimum, as I don't see any assembly in the source code (and it's a linux app so the libraries should be obtainable).

    I remember seeing the page a week ago, and that it said OS X under operating systems. I'm not completely sure I remember correctly, but if I do, maybe it tells us something that it was removed.

    I suspected that, but wanted to check with someone in the know. Thanks for the response.

    Caveman_uk, yes, I was in fact hoping to use it in combination with Blender, which is a very cool app. Actually, I'm kind of the Mac rebel in my game art class, where we're currently doing a mod for Far Cry, mainly with 3DS Max and ZBrush on Windows. I want to learn something I can use on programs I can run (and own), which is why I'm looking for some of the functionalities of ZBrush. There's this script for Blender, but for really high-poly work you need a dedicated app. It's fun, though.
  6. AlmostThere macrumors 6502a

    It uses compiler intrinsics rather than assembly (in but hopefully the configure script will detect whether or not these are supported.

    I assume you have the Developer Kit and X11 installed.

    I checked on darwinports and they have a Mac version of GTK+ 2.8.x which was the first failed dependency I found. Darwinports will download, build and install that for you if you want to get started trying to build this (it will take some time though, more than I have right now...). Maybe they can meet the dependencies that fink doesn't.
  7. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005
    OK. I don't know much about it, but is this a way of doing cross-processor low level programming, or is it i386 specific?

    Yes, I have both installed.

    My configure fails at pkg-config (see below). I have Darwinports and will look into it.

    Actually, I'm such a newbie at the terminal / unixy side of things that the question I was trying to ask in the OP was this:

    make install
    Are the above the correct commands to compile and install a program from source?

    Apologies to the above poster, I overlooked your post when I first answered. Below is the point at which ./configure stops:

    checking for pkg-config... no
    *** The pkg-config script could not be found. Make sure it is
    *** in your path, or set the PKG_CONFIG environment variable
    *** to the full path to pkg-config.
    *** Or see to get pkg-config.
    configure: error: Library requirements (sigc++-2.0 >= 2.0.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
  8. AlmostThere macrumors 6502a

    Compiler intrinsics are basically a way of calling specific assembly instructions through C code, with C-language variables. The GNU compiler uses them for altivec code and SSE instructions.

    OK, for a message like the one below, you are missing a programme called pkgconfig (annoyingly not pkg-config) which creates the correct compiler flags and a library called libsigc++ (which it can't find either because you probably don't have it and it is expecting pkgconfig to tell it where it is).

    This is where you want some UNIX package management system. Coming from Debian, I have always favoured fink but this does not have sufficiently up to date packages in this case. In which case you want to head over to and download and install their package.

    Then open a console and type:

    $sudo port install pkgconfig

    which will download, build and install that package.

    You might do well to read their documents, though as you will need to repeat this for each unmet dependency (feel free to post them here).

    For libsigc++, a little more detail - search for libsigc++:

    $port search sigc
    libsigc++ devel/libsigc++ @1.2.7 C++ signal callback system
    libsigc++1 devel/libsigc++1 @1.0.4 C++ callback system (version 1.0.x)
    libsigc++2 devel/libsigc++2 @2.0.16 C++ signal callback system

    revealing libsigc++2 version 2.0.16 which we can see from the message configure: error: Library requirements (sigc++-2.0 >= 2.0.6) not met; will satisfy the requirement.

    Also : you are building version 0.11 aren't you (I downloaded 0.10 by accident).
  9. AlmostThere macrumors 6502a

    Oh, and yes you are doing the right thing.
    ./configure needs to create a Makefile before the next stages will run.
  10. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005
    This is fun! I'm actually learning something. I figured out about the dependencies from your replies, and had gotten both pkgconfig and libsigc+ through darwinports before your reply. GTK seems to be a tough one to build, though - I'll look around for a binary instead.

    I was actually building 0.10, because Sourceforge called it the latest stable release - but I guess "stable" is a bit much to ask from an alpha. So I'll download 0.11 and start over.

    In any case I'll be sure to post my results here.

    Thanks for taking the time to put me on the right track!
  11. mwpeters8182 macrumors 6502

    Apr 16, 2003
    Boston, MA
    There should be a port for gtk in either darwinports or fink. That should make things easier.

  12. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005
    Yes, now I've gotten GTK and dependancies off Darwinports. The next problem is something called gtkglextmm, which is neither on Darwinports or Fink.

    I've downloaded the source for that.

    sudo make install
    gives me what looks like a clean build and a directory that looks like the list in the bottom of my post. But SharpConstruct's configure still won't recognise it. Does "make install" build a file that I have to execute to install? I've tried bashing both "install-sh" and "". The latter says it's missing an argument:

    Usage: <unpacked prefix dir>
    Example: ./ c:/gtkglextmm
    Can anyone see from this what I'm doing wrong?

    Thanks in advance!

    TSAs-powerbook58:~/documents/dl/gtkglextmm-1.1.0 sbn$ ls
  13. AlmostThere macrumors 6502a

    Can you post the last few lines from the output from the Sharp configure script that show the error?

    make install is the installation process - you should have seen lots of installation lines flying past the screen after running it - but it might have installed it somewhere the Sharp configure script doesn't know about (probably /usr/local if you have built from source rather than a package).
  14. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005

    checking for gtkglextmm... configure: error: Package requirements (gtkglextmm-1.2 >= 1.0.0) were not met.
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    Alternatively you may set the gtkglextmm_CFLAGS and gtkglextmm_LIBS environment variables
    to avoid the need to call pkg-config.  See the pkg-config man page for
    more details.
    I've been looking at the pkg-config man page, but don't know what to make of it. Environment variables and CFLAGS are new concepts to me - i wouldn't know how to set them.

    Once again thanks for taking the time to help me, AlmostThere. It's especially rewarding to have my very basic (dumb) questions answered, so I not only make progress with the actual build, but get to understand the commands and the logic behind it a little better, as well.
  15. AlmostThere macrumors 6502a

    No worries, takes me back to what Linux used to be like a good few years ago. Things like fink (and the Linux equivalents) are god sends for sorting out this sort of dependency nightmare ... I remember using gtkglextmm a few years ago, too.

    There are several options:
    Possibly the easiest is to check that gtkglextmm is actually installed. At the command line, try

    $find /opt -name '*.pc'
    $find /usr -name '*.pc'

    Hopefully it will identify gtkglextmm.pc probably in /usr/local/somewhere, in which case you might need to type

    $export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/the/path/to/the/pcfile/

    which should enable the pkgconfig programme to identify the path to the configuation file (that's gtkglextmm.pc). Don't include the actual file in the path above.

    Alternatively, you could try rebuilding gtkglextmmm but at the start specify

    ./configure --prefix=/opt

    which will then install gtkglextmm into the darwinports directory.

    Short explanation
    The reason for all this is that pkgconfig is basically a programme that reads configuration files and tells the build process where all the dependencies -libraries and such like - are.

    I don't know what the default search paths (i.e. where it expects the configuation files to be) for pkgconfig are, the man page says that this is tied to the configure --prefix option when it was built, which means it is probably only looking in /opt/lib/pkgconfig (darwinports installs everything into /opt so I assume software is compiled with that option).

    Setting the environment variable PKG_CONFIG_PATH should customise this path, but it might be a good idea to install all your Unix stuff into the same directory.

    I hope it actually works in the end ... and you haven't changed your mind about the fun bit you mentioned earlier. Hey, at least it is educational if you ever want to learn about programming or fancy becoming a Unix system admin!
  16. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005

    After looking around for gtkglextmm.pc (partly using the finder, i admit), I found it in /opt/lib/pkgconfig/ , so setting the environment variable worked. There's another pkgconfig dir in /opt/local/lib/ where all the other stuff from Darwinports is installed. Can't really explain how the other directory got there.

    The good news is that ./configure got done all the way through - the bad news is that now I get compiler errors when i try to make. Specifically, a boatload from optimized.h, and then this:
    Code: In member function 'unsigned int SharpConstruct::Brush::Radius() const': warning: converting to 'unsigned int' from 'float'
    make[1]: *** [Brush.o] Error 1
    make: *** [all-recursive] Error 1
    Oh well, it was worth a shot. As you said, this program probably needs proper porting.

    Actually, I've dabbled a bit in programming but never the terminal before. All the OSS software I use makes me wish I knew enough to start contributing - at least with portfiles for Darwinports and other small bits.

    Maybe one day I'll know enough to do more than rescuing people's data off their virus-infested harddrives.

    Again, thanks for all the help!
  17. ThatSoundAgain thread starter macrumors member

    Apr 10, 2005
    Oh, by the way, the dependencies were a grand total of:

    - pkg-config
    - gtk2
    - libglademm

    - gtkglextmm

    The first three were on Darwinports, the last you know about. Especially gtk2 took a couple of hours by itself, it had lots of dependencies in turn.

Share This Page