nu774 / fdkaac

command line encoder frontend for libfdk-aac
Other
260 stars 58 forks source link

error: required file '../config.rpath' not found #53

Closed alamia442 closed 4 months ago

alamia442 commented 2 years ago

error log

12 249.6 Cloning into 'fdkaac'...

12 254.1 configure.ac:56: error: required file '../config.rpath' not found

12 254.2 autoreconf: automake failed with exit status: 1

my command git clone https://github.com/nu774/fdkaac.git cd fdkaac autoreconf -i ./configure make make install

how to fix?

nu774 commented 2 years ago

I think you just need to create empty config.rpath like this: $ touch config.rpath This error is caused by AM_ICONV in configure.ac to check iconv(), which requires iconv.m4, which requires AC_LIB_RPATH, which requires config.rpath presence.

jjr90 commented 4 months ago

I think you just need to create empty config.rpath like this: $ touch config.rpath

This actually means creating the file outside of the source tree (in parent directory "..").

This happens when the builder has placed fdkaac as a subdirectory of another autotools-based source tree (such as libfdk-aac). In my case, I had it in fdk-aac/third_party/fdkaac (similar to how zlib bundles tools in a 'contrib' dir).

The problem is that automake has a documented "feature" that if AC_CONFIG_AUX_DIR is not set, then automake will snoop around the parent (..) and grandparent (../..) directories for some scripts, and if it finds any then it demands other things to be there too.

To fix it I edited configure.ac, inserting AC_CONFIG_AUX_DIR([.]) above the line AM_INIT_AUTOMAKE.

So the new configure.ac looks like:

# ...
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([.])

AM_INIT_AUTOMAKE
# ...

Then automake won't probe outside the source tree.

nu774 commented 4 months ago

Thanks @jjr90, fixed on 1.0.6.