Compiling in OS X?

99 views
Skip to first unread message

Topher

unread,
Nov 22, 2012, 11:10:51 PM11/22/12
to sti...@googlegroups.com
I am using stimfit 0.11.1 on OS X 10.8.2, and but am experiencing a bug with this build where the destination folder name is being appended to the final file name. Apparently this bug has been addressed in more recent builds than 0.11.1, but there does not appear to be a binary available. I've downloaded the 0.11.4 source and satisfied the various dependencies from what I can tell, but when I compile I'm getting various errors, such as the following:

Tophers-Laptop:stimfit-0.11.4 tkessler$ make
Making all in src
Making all in libstfio
  CXX   channel.o
In file included from ./channel.cpp:15:
././stfio.h:28:30: error: boost/function.hpp: No such file or directory
make[3]: *** [channel.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This appears to be a missing file, and I can get around it by removing the include statement from the file in question (hopefully not causing any problems), but doing this is clearly not the proper solution. Is there some specific step I am missing that is causing this, or are there some more current instructions for compiling in the latest versions of OS X? I've looked at the current OS X compiling instructions in the stimfit documentation, but these do not seem to apply well for the more recent versions of both OS X and Xcode.

I have experience with various scripting and higher-level languages (javascript, matlab, Igor Pro, etc.), but have little C and C++ experience so tackling makefiles and the data structure here is a bit of a challenge and a shot in the dark for me.

Thanks a bunch for any guidance,
-Topher

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 7:12:00 AM11/23/12
to sti...@googlegroups.com
Hi,

at this time, we only actively support building with MacPorts
(www.macports.org). Once you have MacPorts installed, add the
following line to /opt/local/etc/macports/sources.conf:

file:///${STIMFITDIR}/stimfit/macosx/macports

(where ${STIMFITDIR} is your is your stimfit source directory), right
in front of

rsync://rsync.macports.org/release/tarballs/ports.tar [default]

i.e. the last two lines might look something like this in the end:

file:///Users/topher/stimfit/macosx/macports
rsync://rsync.macports.org/release/tarballs/ports.tar [default]

Then change to the local Stimfit macports directory:

cd ${STIMFITDIR}/macosx/macports

And add the local ports file to MacPorts:

$ sudo portindex

From there, building stimfit should be as simple as

$ sudo port install stimfit

This will magically pull in all the required build dependencies. But
I'm pretty sure that I forgot something along the way, so please
report back as soon as you run into problems.

Cheers,
Christoph
--
Christoph Schmidt-Hieber
Wolfson Institute for Biomedical Research
University College London
Gower Street
London WC1E 6BT
UK
Phone +44 (0)7551994016

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 7:17:04 AM11/23/12
to sti...@googlegroups.com
On Thu, Nov 22, 2012 at 08:10:51PM -0800, Topher wrote:
> I've downloaded the 0.11.4 source

One more thing: I'd strongly recommend to use the latest development
code. If you have git installed (sudo port install git-core), do:

git clone https://code.google.com/p/stimfit/

Christoph

Topher

unread,
Nov 23, 2012, 8:06:22 AM11/23/12
to sti...@googlegroups.com
Hi,

Thanks for the instructions. I've followed them to the point where I add the local ports file to MacPorts, but when running "sudo port install stimfit" I get the following error:

Tophers-Laptop:~ tkessler$ sudo port install stimfit
Error: Unable to execute port: could not read "/Users/tkessler/Downloads/stimfit/macosx/macports/science/stimfit/Portfile": permission denied

I've tried giving full read, write, and execute permissions to the stimfit source directory, and have also tried changing ownership and primary group on the directory to that for my account, but it still gives this error. The referenced Portfile is in the directory and after the modifications has the following properties:

-rwxrwxrwx  1 tkessler  staff  1803 Nov 23 04:39 Portfile

…so I'm not sure what's going on and why a permissions denied issue is being a problem here.

Any insights?

Thanks,
-Topher

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 8:10:34 AM11/23/12
to sti...@googlegroups.com
Wow, that was fast.

What are the permissions of the parent directories leading up to
/Users/tkessler/Downloads/stimfit/macosx/macports/science/stimfit/Portfile?

Topher

unread,
Nov 23, 2012, 8:23:31 AM11/23/12
to sti...@googlegroups.com
Ah! that was it. The permissions for the Downloads directory is only 

drwx------+ 176 tkessler  staff     5984 Nov 23 04:41 Downloads

...so moving the source directory to the root of my account and changing the references in the sources.conf file accordingly has it working. It's currently in the process of getting dependencies, building, and installing. I'll report back if any other problems crop up.

Thanks a bunch for your help, and for stimfit! If I was a competent coder I'd definitely contribute to the project.

-Topher

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 8:26:38 AM11/23/12
to sti...@googlegroups.com
Thanks for testing Stimfit. We should post some build instructions for
OS X according to your experience.
I should mention that the bug may still be present in your MacPorts
build. I totally forgot that MacPorts will pull the released code
tarball. If that's the case, I'll guide you through building the git
code, which is relatively pain-free now that you have all the MacPorts
dependencies.

Christoph

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 8:39:35 AM11/23/12
to sti...@googlegroups.com, Jose Guzman
On Fri, Nov 23, 2012 at 05:23:31AM -0800, Topher wrote:
> Thanks a bunch for your help, and for stimfit! If I was a competent coder
> I'd definitely contribute to the project.

It would be very helpful if you could update the build instructions
for OS X according to what you just did. They are living here in the
git repository:

stimfit/doc/sphinx/osx_install_guide/*.rst

and look like this when converted to html:

http://www.stimfit.org/doc/sphinx/osx_install_guide/index.html

Thanks,
Christoph

Topher

unread,
Nov 23, 2012, 9:37:47 AM11/23/12
to sti...@googlegroups.com
Hmmmm...running into a build error for stimfit. The dependencies all installed, but when it gets to stimfit the following happens:

--->  Building stimfit
Error: org.macports.build for port stimfit returned: command execution failed
Please see the log file for port stimfit for details:
    /opt/local/var/macports/logs/_Users_tkessler_stimfit_macosx_macports_science_stimfit/stimfit/main.log
To report a bug, follow the instructions in the guide:
Error: Processing of port stimfit failed
Tophers-Laptop:macports tkessler$ 

I can upload the log file or part of it if needed (it's a bit long). This is using the 0.11.4 source downloaded using "git clone https://code.google.com/p/stimfit/"

Christoph Schmidt-Hieber

unread,
Nov 23, 2012, 10:02:29 AM11/23/12
to sti...@googlegroups.com
Can you send me the log file per email please?

Christoph

Mike Giangrasso

unread,
Apr 2, 2013, 8:46:16 PM4/2/13
to sti...@googlegroups.com
Hi all!

I'd like to bump this topic to the top, as I have run into the same two problems that Topher encountered during his build of stimfit on OS X. The permissions solution offered in this thread was sufficient to fix the first problem, and now I have run into the error outlined below:

localhost:~ Mike$ sudo port install stimfit
Password:
--->  Computing dependencies for stimfit
--->  Building stimfit
Error: org.macports.build for port stimfit returned: command execution failed
Please see the log file for port stimfit for details:
    /opt/local/var/macports/logs/_Users_Mike_stimfit_macosx_macports_science_stimfit/stimfit/main.log
To report a bug, follow the instructions in the guide:
Error: Processing of port stimfit failed

Does anyone have any suggestions for approaching this issue? Your help would be greatly appreciated!

Mike

Mike Giangrasso

unread,
Apr 2, 2013, 8:49:11 PM4/2/13
to sti...@googlegroups.com
An addendum: as per macports documentation, I "cleaned" the stimfit port and then attemped to reinstall, to no avail:

localhost:~ Mike$ sudo port clean stimfit
--->  Cleaning stimfit
localhost:~ Mike$ sudo port install stimfit
--->  Computing dependencies for stimfit
--->  Fetching archive for stimfit
--->  Attempting to fetch stimfit-0.11.5_0+python27.darwin_12.x86_64.tbz2 from http://packages.macports.org/stimfit
--->  Attempting to fetch stimfit-0.11.5_0+python27.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/stimfit
--->  Attempting to fetch stimfit-0.11.5_0+python27.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/stimfit
--->  Fetching distfiles for stimfit
--->  Verifying checksum(s) for stimfit
--->  Extracting stimfit
--->  Configuring stimfit

Christoph Schmidt-Hieber

unread,
Apr 3, 2013, 6:12:21 AM4/3/13
to sti...@googlegroups.com
Hi Mike,

please send me the following file per email:

/opt/local/var/macports/logs/_Users_Mike_stimfit_macosx_macports_science_stimfit/stimfit/main.log

Thanks!
Christoph
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "stimfit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to stimfit+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Christoph Schmidt-Hieber

unread,
Jul 2, 2013, 7:16:46 AM7/2/13
to sti...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages