alperakcan/fuse-ext2

configure fails: No package 'ext2fs' found

Closed this issue ยท 12 comments

CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure

eventually results in:

checking for library containing sem_post... none required
checking for library containing fuse_main... -losxfuse
checking for library containing com_err... -lcom_err
checking for library containing ext2fs_open... -lext2fs
checking if FUSE on this system is too new for us... no
Disabling debug support by default
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for e2fs... no
configure: error: Package requirements (ext2fs >= 1.41.13) were not met:

No package 'ext2fs' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables e2fs_CFLAGS
and e2fs_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Output brew --prefix e2fsprogs:

/usr/local/opt/e2fsprogs

So clearly the library is present. How can I run configure so that it finds the library?

I'm on OS X 10.11, SIP disabled.

Try exporting the paths. This worked for me.

export e2fs_CFLAGS=/usr/local/opt/e2fsprogs/lib
export e2fs_LIBS=/usr/local/opt/e2fsprogs/include

It's probably better to just prepend
PKG_CONFIG_PATH="$(brew --prefix e2fsprogs)/lib/pkgconfig"
to the configure call, pkg-config will then find the relevant items itself.

fitch commented

Running

export e2fs_CFLAGS=/usr/local/opt/e2fsprogs/lib
export e2fs_LIBS=/usr/local/opt/e2fsprogs/include

before

CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure

worked for me.

Hi, i have same problem on this step:

checking for library containing ext2fs_open... -lext2fs
checking if FUSE on this system is too new for us... no
Disabling debug support by default
./configure: line 18606: syntax error near unexpected token e2fs,ext2fs
./configure: line 18606: `PKG_CHECK_MODULES(e2fs,ext2fs >= 1.41.13)'

Any idea?

zg commented

I'm on OS X El Capitan and prepending PKG_CONFIG_PATH="$(brew --prefix e2fsprogs)/lib/pkgconfig" to the configure execution fixed the issue. The full command I ran was:

PKG_CONFIG_PATH="$(brew --prefix e2fsprogs)/lib/pkgconfig" CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure

I also had to install pkg-config from brew. That seemed to be the cause of the syntax error problem when running ./configure. The pkg-config requirement seems to be missing from the installation instructions.

sorry, but PKG_CONFIG_PATH didn't help me...
now i try to run next command:
PKG_CONFIG_PATH="/usr/local/Cellar/e2fsprogs/1.42.13/lib/pkgconfig" CFLAGS="-idirafter/usr/local/Cellar/e2fsprogs/1.42.13/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/e2fsprogs/1.42.13/lib" ./configure

P.S.: I don't use $(brew --prefix e2fsprogs) because i have same problem #23
P.P.S: I'm on OS X El Capitan too

Anyone figure this out yet? I have the same problem as above and I'm running 10.11.5

I have tried everything from scratch with no success:

$ brew install e2fsprogs m4 automake autoconf libtool
$ git clone https://github.com/alperakcan/fuse-ext2.git
$ cd fuse-ext2
$ ./autogen.sh

then I have tried

$ CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure

but it gives back that error. While trying

PKG_CONFIG_PATH="/usr/local/Cellar/e2fsprogs/1.42.13/lib/pkgconfig" CFLAGS="-idirafter/usr/local/Cellar/e2fsprogs/1.42.13/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/e2fsprogs/1.42.13/lib" ./configure

it gives back

config.status: error: cannot find input file: `fuse-ext2/Makefile.in'

@loretoparisi: I think your problem is related to autogen.sh not working. Have you seen the issue #32?

@gpz500 wow thank you! I have added the line as describe in configure.ac:

m4_ifdef([AC_PROG_LIB],[AC_PROG_LIB],[m4_warn(portability,[Missing AC_PROJ_LIB])])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

And then it worked|

Added m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) as well to the end of configure.ac and then reran autogen.sh and then the configure went on through:
PKG_CONFIG_PATH="$(brew --prefix e2fsprogs)/lib/pkgconfig" CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure

Oddly I had to also run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer even though other builds have been working fine prior to this.