How do I build fuse?

1,736 views
Skip to first unread message

pwas...@orderndev.com

unread,
Jun 24, 2011, 11:04:22 AM6/24/11
to fus...@googlegroups.com
I have tried to build the fuse library by the following steps.

cd /sandbox/fuse
./build.rb

I get the following errors.

configure.in:77: warning: macro `AM_ICONV' not found in library
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
glibtoolize: copying file `m4/libtool.m4'
glibtoolize: copying file `m4/ltoptions.m4'
glibtoolize: copying file `m4/ltsugar.m4'
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in:77: warning: macro `AM_ICONV' not found in library
configure.in:77: error: possibly undefined macro: AM_ICONV
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

I am building on Mac OS/X 10.6.7 with Xcode 3.2.6 installed.

Anatol Pomozov

unread,
Jun 24, 2011, 12:25:22 PM6/24/11
to fus...@googlegroups.com
glibtoolize cannot find macros definition for AM_ICONV. This macros is defined in iconv.m4 file that is distributed with gettext tool.

To resolve this issue you can:
1) Preferable way is to install gettext package using some package manager such as macports. Read this page http://www.macports.org/install.php then install the gettext package as "sudo port install gettext".

Another package manager you might want to use instead of macport is Homebrew. http://mxcl.github.com/homebrew/ I've never used it though.

2) Install iconv/gettext by yourself, compiling it from sources. IMHO it is more difficult.

pwas...@orderndev.com

unread,
Jun 24, 2011, 3:03:42 PM6/24/11
to fus...@googlegroups.com
I installed macports and installed gettext but still get the same error. Any more ideas?

Anatol Pomozov

unread,
Jun 24, 2011, 3:12:36 PM6/24/11
to fus...@googlegroups.com
Hi


On Fri, Jun 24, 2011 at 12:03 PM, pwas...@orderndev.com <pwas...@orderndev.com> wrote:
I installed macports and installed gettext but still get the same error. Any more ideas?

Hmm.. It sounds weird.

Try to clean all generated files from the project - run "git clean -xdf && autoreconf -fi". If it still fails show me your:

ls -l /opt/local/share/aclocal/iconv.m4
which libtoolize
which glibtoolize
glibtoolize --version
autoconf --version


PS /opt/local/share/aclocal/iconv.m4 is where the macro is defined.

pwas...@orderndev.com

unread,
Jun 24, 2011, 3:43:49 PM6/24/11
to fus...@googlegroups.com
Still the same error.

SnowyMacPro:fuse pwasmund$ ls -l /opt/local/share/aclocal/iconv.m4
-rw-r--r--  2 root  admin  7519 Jun 24 13:35 /opt/local/share/aclocal/iconv.m4
SnowyMacPro:fuse pwasmund$ which libtoolize
SnowyMacPro:fuse pwasmund$ which glibtoolize
/usr/bin/glibtoolize
SnowyMacPro:fuse pwasmund$ glibtoolize --version
libtoolize (GNU libtool) 2.2.4
Written by Gary V. Vaughan <ga...@gnu.org>, 2003

Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SnowyMacPro:fuse pwasmund$ autoconf --version
autoconf (GNU Autoconf) 2.61
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

Anatol Pomozov

unread,
Jun 24, 2011, 3:53:44 PM6/24/11
to fus...@googlegroups.com
I use the newer autoconf/glibtoolize from macports:

$ which autoconf
/opt/local/bin/autoconf
$ which glibtoolize
/opt/local/bin/glibtoolize

version 2.68 and 2.4 accordingly. Maybe this is a culprit. Try to install them "sudo port install libtool autoconf". Remember if it conflicts with the older versions - you can always uninstall the macport packages. 

After installing it check that you use versions from macport. Also check that macports has added following line to your ~/.bash_profile:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Once you make sure that macports' version is the default - clean fuse project and rerun "autoreconf -fi" again.

pwas...@orderndev.com

unread,
Jun 24, 2011, 4:45:20 PM6/24/11
to fus...@googlegroups.com
That got me a Makefile for fuse but that fails also. A very small chunk of output from my build shows the problems.

Makefile
config.status: creating lib/Makefile
config.status: creating util/Makefile
config.status: creating include/Makefile
config.status: creating example/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Making all in include
Making all in lib
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -DFUSERMOUNT_DIR=\"/usr/local/bin\" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing -DUNNAMED_SEMAPHORES_NOT_SUPPORTED -D_POSIX_C_SOURCE=200112L -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -c fuse.c  -fno-common -DPIC -o .libs/fuse.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -DFUSERMOUNT_DIR=\"/usr/local/bin\" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing -DUNNAMED_SEMAPHORES_NOT_SUPPORTED -D_POSIX_C_SOURCE=200112L -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -c fuse_loop.c  -fno-common -DPIC -o .libs/fuse_loop.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include -DFUSERMOUNT_DIR=\"/usr/local/bin\" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=26 -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing -DUNNAMED_SEMAPHORES_NOT_SUPPORTED -D_POSIX_C_SOURCE=200112L -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -c fuse_kern_chan.c  -fno-common -DPIC -o .libs/fuse_kern_chan.o
In file included from ../include/fuse_lowlevel.h:26,
                 from fuse_loop.c:9:
../include/fuse_common.h:19:20: error: stdint.h: No such file or directory
In file included from ../include/fuse.h:26,
                 from fuse_i.h:9,
                 from fuse.c:13:
../include/fuse_common.h:19:20: ../include/fuse_common.h:41:22:error:  error: stdint.h: No such file or directorysys/stat.h: No such file or directory

../include/fuse_common.h:41:22: error: sys/stat.h: No such file or directory
In file included from ../include/fuse_lowlevel.h:26,
                 from fuse_loop.c:9:
../include/fuse_common.h:57: error: expected specifier-qualifier-list before 'int32_t'
In file included from ../include/fuse.h:26,
                 from fuse_i.h:9,
                 from fuse.c:13:
../include/fuse_common.h:57: error: expected specifier-qualifier-list before 'int32_t'
../include/fuse_common.h:117: error: expected specifier-qualifier-list before 'uint64_t'
../include/fuse_common.h:117: error: expected specifier-qualifier-list before 'uint64_t'
In file included from ../include/fuse_lowlevel.h:26,
                 from fuse_kern_chan.c:9:
../include/fuse_common.h:19:20: error: stdint.h: No such file or directory
In file included from fuse_loop.c:9:
../include/fuse_lowlevel.h:28:19: error: utime.h: No such file or directory

System include files are not being found. Suggestions?

Anatol Pomozov

unread,
Jun 24, 2011, 4:52:29 PM6/24/11
to fus...@googlegroups.com
These are standard header files. It seems that your XCode installation is borked or incomplete.

Show me "ls -l /Developer/SDKs/MacOSX10.6.sdk/" if you don't have this directory you need to install the SDK http://bit.ly/ilXiNa 

pwas...@orderndev.com

unread,
Jun 24, 2011, 5:22:16 PM6/24/11
to fus...@googlegroups.com
My Xcode install was fine, just violated an assumption being made. I had done an install where only some of Xcode is put in Developer and some put in a folder of choice. So most of Xcode was in my /Xcode3.2 folder and not /Developer.

Is there a reason why the kext and framework pieces are built with xcodebuild but fuse is built with make files?

Since building fuse worked I tried building fuse4x. Everything built including the .pkg file but then died trying to build sshfs. 

configure.ac:6: installing `./compile'
configure.ac:2: installing `./install-sh'
configure.ac:2: installing `./missing'
Makefile.am: installing `./INSTALL'
Makefile.am: installing `./COPYING' using GNU General Public License v3 file
Makefile.am:     Consider adding the COPYING file to the version control system
Makefile.am:     for your code, to avoid questions about which license your project uses.
Makefile.am: installing `./depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for library containing dlsym... none required
checking OpenSSH version... 5.2 >= 4.4, disabling NODELAY workaround
./configure: line 3595: syntax error near unexpected token `SSHFS,'
./configure: line 3595: `PKG_CHECK_MODULES(SSHFS, fuse >= 2.2 glib-2.0 gthread-2.0)'
Cannot run script in sshfs

Any ideas?

Anatol Pomozov

unread,
Jun 24, 2011, 5:34:51 PM6/24/11
to fus...@googlegroups.com
Hi

On Fri, Jun 24, 2011 at 2:22 PM, pwas...@orderndev.com <pwas...@orderndev.com> wrote:
My Xcode install was fine, just violated an assumption being made. I had done an install where only some of Xcode is put in Developer and some put in a folder of choice. So most of Xcode was in my /Xcode3.2 folder and not /Developer.

Is there a reason why the kext and framework pieces are built with xcodebuild but fuse is built with make files?

It is because kext is MacFUSE/Fuse4X specific, while fuse project is just a patched version of http://fuse.sourceforge.net/ (see the upstream repos at http://fuse.git.sourceforge.net/git/gitweb-index.cgi) The same true for sshfs.
It cannot find one of the packages. Please run:

pkg-config --print-errors glib-2.0 gthread-2.0

pwas...@orderndev.com

unread,
Jun 24, 2011, 6:31:31 PM6/24/11
to fus...@googlegroups.com
I have no pkg-config so where do I get it and how do I build and install it?

Anatol Pomozov

unread,
Jun 24, 2011, 6:33:50 PM6/24/11
to fus...@googlegroups.com
Hi

On Fri, Jun 24, 2011 at 3:31 PM, pwas...@orderndev.com <pwas...@orderndev.com> wrote:
I have no pkg-config so where do I get it and how do I build and install it?

macports has everything you need: 
"sudo port install pkgconfig" :)

pwas...@orderndev.com

unread,
Jun 24, 2011, 8:06:46 PM6/24/11
to fus...@googlegroups.com
That fixed it. Thanks for all the help.

Anatol Pomozov

unread,
Jun 24, 2011, 8:09:59 PM6/24/11
to fus...@googlegroups.com
Hi

On Fri, Jun 24, 2011 at 5:06 PM, pwas...@orderndev.com <pwas...@orderndev.com> wrote:
That fixed it. Thanks for all the help.

You are very welcome! Enjoy fuse4x hacking.

Anatol Pomozov

unread,
Jun 24, 2011, 8:29:00 PM6/24/11
to fus...@googlegroups.com
Hi

On Fri, Jun 24, 2011 at 5:06 PM, pwas...@orderndev.com <pwas...@orderndev.com> wrote:
That fixed it. Thanks for all the help.


Just added the instruction how to build Fuse4X. Let me know if it is incomplete http://fuse4x.org/faq.html#Q.4.10

Lubo Diakov

unread,
Jan 12, 2012, 9:21:54 PM1/12/12
to fus...@googlegroups.com
One part of the build requirements is ambiguous.

First it says:
you need to have autotools,iconv,pkg-config installed

Underneath it says:
sudo port install libtool autoconf gettext pkgconfig (so basically libtool, autoconf, gettext, pkgconfig)

Both say pkgconfig is required, but is autotools just another name for autoconf and libtool? and how do iconv and gettext fit into the picture?

In other words can it be made into one definitive list (maybe with a footnote like autotools is another name for autotools and libtool if that is really how it is) ?

Anatol Pomozov

unread,
Jan 13, 2012, 5:50:50 PM1/13/12
to fus...@googlegroups.com
Hi

Thanks for the report

autotools is a common name for a group of GNU projects such as autotools autoconf autoheader libtool etc. Different package managers might have different names for this software, e.g. with Homebrew you don't need to install these packages as it uses binaries from XCode (but you need to install the gettext formula).

Some packages in the macports line are missed because they have dependencies and once you install pkg-config you install some other packages. Although it makes sense to specify all ports explicitly. I just pushed an update for this FAQ item.

Reply all
Reply to author
Forward
0 new messages