OpenWrt Forum Archive

Topic: gphoto2: 'AM_PROG_MKDIR_P' macro is deprecated

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I tried to compile gphoto2 (2.5.6) for Raspberry PI2 on Ubuntu 14.04 x64 but I get this error:

make[3]: Entering directory `~/openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6'
cd . && /bin/bash ~/openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6/auto-aux/missing automake-1.15 --gnu
automake-1.15: warnings are treated as errors
configure.ac:63: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:63: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:63: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
make[3]: *** [Makefile.in] Error 1


I have no Idea where $(mkdir_p) or even AM_PROG_MKDIR_P is used in the gphoto2 code,...

can anyone help me getting this running?

regards

Too new automake for too old automake macroses in gphoto2 (2.5.6) sources.
Also, I have to add this fix (las hunk) to avoid errors on make install step.

Hi Ryzhov,

thanks for your fast answer! I tried to add MKDIR_P="mkdir -p" to the MAKE_INSTALL_FLAGS, as your patch proposed, but still end up with the same issue,..

joky wrote:

Hi,

I tried to compile gphoto2 (2.5.6) for Raspberry PI2 on Ubuntu 14.04 x64 but I get this error:

make[3]: Entering directory `~/openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6'
cd . && /bin/bash ~/openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6/auto-aux/missing automake-1.15 --gnu
automake-1.15: warnings are treated as errors
configure.ac:63: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:63: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:63: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
make[3]: *** [Makefile.in] Error 1


I have no Idea where $(mkdir_p) or even AM_PROG_MKDIR_P is used in the gphoto2 code,...

can anyone help me getting this running?

The solution is right there in the above warning message. Take a look at this working with patches and use quilt to create the patch file to replace the 'AM_PROG_MKDIR_P' macro with the Autoconf-provided 'AC_PROG_MKDIR_P' macro and use '$(MKDIR_P)' instead of '$(mkdir_p)'in all the Makefile.am files. Then, bootstrap to generate new configure and all the Makefile.in files.

unfortunately the search for AM_PROG_MKDIR_P returns no lines:

openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6$ find .  -type f -exec grep -H 'AM_PROG_MKDIR_P' {} \;
openwrt/trunk/build_dir/target-arm_cortex-a7+vfp_uClibc-0.9.33.2_eabi/gphoto2-2.5.6$

quite the same for mkdir_p: no Makefile.am that contains mkdir_p?!

$ find .  -type f -exec grep -H 'mkdir_p' {} \;
./gphoto2/Makefile.in:mkdir_p = @mkdir_p@
./m4m/Makefile.in:mkdir_p = @mkdir_p@
./Makefile.in:mkdir_p = @MKDIR_P@
./auto-aux/ltmain.sh:# func_mkdir_p directory-path
./auto-aux/ltmain.sh:func_mkdir_p ()
./auto-aux/ltmain.sh:      save_mkdir_p_IFS="$IFS"; IFS=':'
./auto-aux/ltmain.sh:   IFS="$save_mkdir_p_IFS"
./auto-aux/ltmain.sh:      IFS="$save_mkdir_p_IFS"
./auto-aux/ltmain.sh:      func_mkdir_p "$xdir$objdir"
./auto-aux/ltmain.sh:      func_mkdir_p "$my_xdir"
./auto-aux/ltmain.sh:         func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
./auto-aux/ltmain.sh:    func_mkdir_p "$output_objdir"
./auto-aux/ltmain.sh:     func_mkdir_p "$gentop"
./contrib/Makefile.in:mkdir_p = @mkdir_p@
./packaging/Makefile.in:mkdir_p = @mkdir_p@
./packaging/rpm/Makefile.in:mkdir_p = @mkdir_p@
./aclocal.m4:AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
./tests/Makefile.in:mkdir_p = @mkdir_p@
./tests/staging/subdir1/Makefile.in:mkdir_p = @mkdir_p@
./tests/staging/Makefile.in:mkdir_p = @mkdir_p@
./tests/staging/subdir2/Makefile.in:mkdir_p = @mkdir_p@
./tests/data/Makefile.in:mkdir_p = @mkdir_p@
./configure:# as_fn_mkdir_p
./configure:as_fn_mkdir_p ()
./configure:  test -d "$as_dir" || eval $as_mkdir_p || {
./configure:} # as_fn_mkdir_p
./configure:  as_mkdir_p='mkdir -p "$as_dir"'
./configure:  as_mkdir_p=false
./configure:mkdir_p
./configure:mkdir_p='$(MKDIR_P)'
./configure:# as_fn_mkdir_p
./configure:as_fn_mkdir_p ()
./configure:  test -d "$as_dir" || eval $as_mkdir_p || {
./configure:} # as_fn_mkdir_p
./configure:  as_mkdir_p='mkdir -p "$as_dir"'
./configure:  as_mkdir_p=false
./configure:  as_dir="$ac_dir"; as_fn_mkdir_p
./configure:      as_dir=$dirpart/$fdir; as_fn_mkdir_p
./doc/Makefile.in:mkdir_p = @mkdir_p@

but anyway thanks for your help!!

(Last edited by joky on 12 Apr 2015, 12:49)

The discussion might have continued from here.