Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A Workaround exists: which is to create an empty file with touch vpx_config.h
Newer versions do not have this file included anymore. But but this version demands it.
After trying for quite some and getting the same error I decicded to build libvpx-1.7.0 from 'blfs Version 2018-01-31'. This built sucessfully.
But when I return to jhalfs starting from 'blfs_root make' to continue the the build for 'Introduction to KDE' {which depends on libvpx} It still wants to build libvpx-1.6.1.
Distribution: Ubuntu, mainly. Too much stuff works out of the box O.o
Posts: 71
Rep:
EDIT:
I just looked at the libvpx source (1.6.1).
vpx_config is generated in the main source dir by the configure script. If the configure script fails or you do not run the configure script, then vpx_config.h will not exist, and as such, the build will fail.
Did you run ./configure before make? If so paste output of it.
The configure script shouldn't even run a second time because of this check:
Code:
if [ -f "${source_path}/vpx_config.h" ]; then
die "source directory already configured; run 'make distclean' there first"
fi
So after you run ./configure, irrespective of the Makefile, the vpx_config.h file should be in its directory. So you're saying after you run ./configure no vpx_config.h file exists at vpx_mem/include/vpx_config.h ? (check manually)
A Workaround exists: which is to create an empty file with touch vpx_config.h
Newer versions do not have this file included anymore. But but this version demands it.
After trying for quite some time and getting the same error I decided to build libvpx-1.7.0 from book 'blfs Version 2018-01-31'. This built sucessfully.
But when I return to jhalfs starting from:
cd /home/user/blfs_root/work
sudo make
to continue the the build for 'Introduction to KDE' {which depends on libvpx} It still wants to build libvpx-1.6.1.
I tried touch vpx_config.h in /sources/libvpx-1.6.1/test/
Code:
cd /home/user/blfs_root/work
sudo make
Which produces the following script: But when run it deletes /sources/libvpx-1.6.1/test/vpx_config.h
002-z-libvpx
Code:
#!/bin/bash
set -e
PKG_DIR=libvpx
SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
mkdir -p $SRC_DIR
mkdir -p $BUILD_DIR
cd $SRC_DIR
PACKAGE=libvpx-1.6.1.tar.bz2
if [[ ! -f $PACKAGE ]] ; then
if [[ -f $SRC_ARCHIVE/$PACKAGE ]] ; then
cp $SRC_ARCHIVE/$PACKAGE $PACKAGE
else
wget -T 30 -t 5 http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.6.1.tar.bz2 ||
wget -T 30 -t 5 ${FTP_SERVER}svn/l/$PACKAGE
fi
fi
echo "a19518c8111fa93bdabdd85259162611 $PACKAGE" | md5sum -c -
cd $BUILD_DIR
find . -maxdepth 1 -mindepth 1 -type d | xargs sudo rm -rf
case $PACKAGE in
*.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
tar -xvf $SRC_DIR/$PACKAGE > unpacked
UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
;;
*.tar.lz)
bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked
UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
;;
*.zip)
zipinfo -1 $SRC_DIR/$PACKAGE > unpacked
UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
if test $(wc -w <<< $UNPACKDIR) -eq 1; then
unzip $SRC_DIR/$PACKAGE
else
UNPACKDIR=${PACKAGE%.zip}
unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
fi
;;
*)
UNPACKDIR=$PKG_DIR-build
mkdir $UNPACKDIR
cp $SRC_DIR/$PACKAGE $UNPACKDIR
cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
;;
esac
cd $UNPACKDIR
sed -i 's/cp -p/cp/' build/make/Makefile &&
mkdir libvpx-build &&
cd libvpx-build &&
../configure --prefix=/usr \
--enable-shared \
--disable-static &&
make
sudo -E sh << ROOT_EOF
make -j1 install
ROOT_EOF
sudo /sbin/ldconfig
cd $BUILD_DIR
[[ -n "$KEEP_FILES" ]] || sudo rm -rf $UNPACKDIR unpacked
exit
Is there a way of adding /sources/libvpx-1.6.1/test/ touch vpx_config.h to this script if so how?
I don't think this bug is representing the same problem you are having.
First of all, he was not building VP9 on his own, he was building it as part of some other package, and you don't know the state of the file system at build time, what parameters were provided to configure, what environment vars were designed, or even if the library was modified. Furthermore, that person is relying on the vp9 header that came with redhat, which may or may not be playing nice with the package he's trying to build.
Secondly, even if all of that were the same, it doesn't look like the same issue. Not only his issue when building the decoder, but his is related to environment defines. If his env defines were different, he wouldn't be have this issue. Most of the places vpx_config.h is included are unconditional. It includes them everywhere. In my 1.6.0 source the condition he is talking about (HAVE_CONFIG) simply doesn't exist.
Thirdly, even if you go back to version 1.5.0, the code he's speaking about doesn't exist. Inside vpx/vpx_codec.h , where he's saying the error is, the include for vpx_config.h happens always, irrespective of environment variables. There's no indication of what version he's using so I can't check that.
Quote:
Originally Posted by percy_vere_uk
A Workaround exists: which is to create an empty file with touch vpx_config.h
Yeah, that should resolve it, assuming there's no dependencies it needs in there (which is likely there will be). If so it'll just error out in another place. So what happens when you try that (instructions at bottom)?
Quote:
Originally Posted by percy_vere_uk
Newer versions do not have this file included anymore. But but this version demands it.
That is simply not true. The latest tag is version 1.7.0 and in vpx/vpx_mem.h, where yours is erroring, right there on line 14 is a big fat:
Code:
#include "vpx_config.h"
I literally just copied and pasted that from latest release. So saying new versions don't have this isn't true. As far as I can tell they all use it. My local version (1.6.0) uses it, too.
Looks like I was wrong about where it creates vpx_config.h. I checked my local copy, which is on windows, at the moment. vpx_config.h was generated inside the build directory, at the root level of it. I thought it was the source root. So check there. I'm using 1.6.0.
Quote:
Originally Posted by percy_vere_uk
After trying for quite some time and getting the same error I decided to build libvpx-1.7.0 from book 'blfs Version 2018-01-31'. This built sucessfully.
But when I return to jhalfs starting from:
cd /home/user/blfs_root/work
sudo make
to continue the the build for 'Introduction to KDE' {which depends on libvpx} It still wants to build libvpx-1.6.1.
I tried touch vpx_config.h in /sources/libvpx-1.6.1/test/
Code:
cd /home/user/blfs_root/work
sudo make
Which produces the following script: But when run it deletes /sources/libvpx-1.6.1/test/vpx_config.h
002-z-libvpx
Code:
#!/bin/bash
set -e
PKG_DIR=libvpx
SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
mkdir -p $SRC_DIR
mkdir -p $BUILD_DIR
cd $SRC_DIR
PACKAGE=libvpx-1.6.1.tar.bz2
if [[ ! -f $PACKAGE ]] ; then
if [[ -f $SRC_ARCHIVE/$PACKAGE ]] ; then
cp $SRC_ARCHIVE/$PACKAGE $PACKAGE
else
wget -T 30 -t 5 http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.6.1.tar.bz2 ||
wget -T 30 -t 5 ${FTP_SERVER}svn/l/$PACKAGE
fi
fi
echo "a19518c8111fa93bdabdd85259162611 $PACKAGE" | md5sum -c -
cd $BUILD_DIR
find . -maxdepth 1 -mindepth 1 -type d | xargs sudo rm -rf
case $PACKAGE in
*.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
tar -xvf $SRC_DIR/$PACKAGE > unpacked
UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
;;
*.tar.lz)
bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked
UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
;;
*.zip)
zipinfo -1 $SRC_DIR/$PACKAGE > unpacked
UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
if test $(wc -w <<< $UNPACKDIR) -eq 1; then
unzip $SRC_DIR/$PACKAGE
else
UNPACKDIR=${PACKAGE%.zip}
unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
fi
;;
*)
UNPACKDIR=$PKG_DIR-build
mkdir $UNPACKDIR
cp $SRC_DIR/$PACKAGE $UNPACKDIR
cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
;;
esac
cd $UNPACKDIR
sed -i 's/cp -p/cp/' build/make/Makefile &&
mkdir libvpx-build &&
cd libvpx-build &&
../configure --prefix=/usr \
--enable-shared \
--disable-static &&
make
sudo -E sh << ROOT_EOF
make -j1 install
ROOT_EOF
sudo /sbin/ldconfig
cd $BUILD_DIR
[[ -n "$KEEP_FILES" ]] || sudo rm -rf $UNPACKDIR unpacked
exit
What script is this? (the name) If you're running this script to build, and since the 'make' is after the 'configure', it should definitely exist at build time.
Though there's about 1000 defines in there. So while this will fix the exact problem you're having, I'm pretty sure it'll blow up later in the build process with an error along the lines of:
"X not defined"
blfs_root is the directory created for jhalfs and contains all its files.
002-z-libvpx is the build script created by jhalfs and is produced by:
Code:
$ cd /home/user/blfs_root
$ make {select app to install}[*] Multimedia[*] Multimedia Libraries and Drivers[*] libvpx 1.6.1
exit {from the menu}
$ cd /home/user/blfs_root/work
$ ../gen-makefile.sh
$ sudo make
blfs_root is the directory created for jhalfs and contains all its files.
002-z-libvpx is the build script created by jhalfs and is produced by:
Code:
$ cd /home/user/blfs_root
$ make {select app to install}[*] Multimedia[*] Multimedia Libraries and Drivers[*] libvpx 1.6.1
exit {from the menu}
$ cd /home/user/blfs_root/work
$ ../gen-makefile.sh
$ sudo make
I'm not entirely familiar with blfs, I've done the typical LFS stuff before, but not dived into the 'beyond' portion. When is the 'configure' script being ran? Since that's responsible for generating the missing file, I'm most concerned about that.
This gen-makefile.sh, is this part of LFS? I do not see it in the normal libvpx 1.6.1 repo, but I may be missing it. The configure script is needed to generate that vpx_config.h file, and I don't see it. Also, the makefile for libvpx is already generated, so I'm not entirely sure what gen-makefile.sh is doing.
I feel like 'configure' isn't being ran or at least ran properly.
EDIT:
Ahh nvm. I see what the gen-makefile.sh is doing now and what that script is, OK, so that's a LFS piece.
So what happens when you run 'configure' manually? Just do exactly what the makefile is doing and post the output:
So what happens when you run 'configure' manually? Just do exactly what the makefile is doing and post the output:
Building directly from blfs 8.1 book {bypassing jhalfs}
The build instructions are:
Installation of libvpx
Install libvpx by running the following commands:
Code:
sed -i 's/cp -p/cp/' build/make/Makefile &&
mkdir libvpx-build &&
cd libvpx-build &&
../configure --prefix=/usr \
--enable-shared \
--disable-static &&
make
This package does not come with a test suite.
Now, as the root user:
make install
libvpx-1.6.1 builds successfully
I also built gst-plugins-good-1.12.2 from book which depends on libvpx-1.6.1 and is the next build script in the jhalfs list. This builds successfully as well. I do not see why jhalfs is wanting to build libvpx. I assume that re-building the blfs_root directory means that it will see that libvpx-1.6.1 is already built.
Returning to jhalfs having now re-built jhalfs blfs_root directory for a clean start.
Code:
cd /home/graham/blfs_root
make {select app to install} KDE ---> Introduction to KDE ---> *selected all
exit
cd /home/graham/blfs_root/work
../gen-makefile.sh
sudo make
Part error log as there are many references to missing ./vpx_config.h :
Code:
In file included from ../test/vp9_skip_loopfilter_test.cc:13:0:
../test/codec_factory.h:13:10: fatal error: ./vpx_config.h: No such file or directory
#include "./vpx_config.h"
^~~~~~~~~~~~~~~~
I have used this standard format for jhalfs builds many times before and never experienced a problem other than minor script changes.
/sources/libvpx-1.6.1/libvpx-build/Makefile As built from book
Code:
##
## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
include config.mk
quiet?=true
ifeq ($(target),)
# If a target wasn't specified, invoke for all enabled targets.
.DEFAULT:
@for t in $(ALL_TARGETS); do \
$(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\
done
all: .DEFAULT
clean:: .DEFAULT
exampletest: .DEFAULT
install:: .DEFAULT
test:: .DEFAULT
test-no-data-check:: .DEFAULT
testdata:: .DEFAULT
utiltest: .DEFAULT
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
test_%: .DEFAULT ;
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
# installed on cygwin, so we need to autodetect here.
md5sum := $(firstword $(wildcard \
$(foreach e,md5sum openssl,\
$(foreach p,$(subst :, ,$(PATH)),$(p)/$(e)*))\
))
md5sum := $(if $(filter %openssl,$(md5sum)),$(md5sum) dgst -md5,$(md5sum))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
dist:
@for t in $(ALL_TARGETS); do \
$(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\
done
# Run configure for the user with the current toolchain.
@if [ -d "$(DIST_DIR)/src" ]; then \
mkdir -p "$(DIST_DIR)/build"; \
cd "$(DIST_DIR)/build"; \
echo "Rerunning configure $(CONFIGURE_ARGS)"; \
../src/configure $(CONFIGURE_ARGS); \
$(if $(filter vs%,$(TGT_CC)),make NO_LAUNCH_DEVENV=1;) \
fi
@if [ -d "$(DIST_DIR)" ]; then \
echo " [MD5SUM] $(DIST_DIR)"; \
cd $(DIST_DIR) && \
$(md5sum) `find . -name md5sums.txt -prune -o -type f -print` \
| sed -e 's/MD5(\(.*\))= \([0-9a-f]\{32\}\)/\2 \1/' \
> md5sums.txt;\
fi
endif
# Since we invoke make recursively for multiple targets we need to include the
# .mk file for the correct target, but only when $(target) is non-empty.
ifneq ($(target),)
include $(target)-$(TOOLCHAIN).mk
endif
BUILD_ROOT?=.
VPATH=$(SRC_PATH_BARE)
CFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH)
CXXFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH)
ASFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT)/ -I$(SRC_PATH)/
DIST_DIR?=dist
HOSTCC?=gcc
TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN)))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
quiet:=$(if $(or $(verbose), $(V)),, yes)
qexec=$(if $(quiet),@)
# Cancel built-in implicit rules
%: %.o
%.asm:
%.a:
%: %.cc
#
# Common rules"
#
.PHONY: all
all:
.PHONY: clean
clean::
rm -f $(OBJS-yes) $(OBJS-yes:.o=.d) $(OBJS-yes:.asm.S.o=.asm.S)
rm -f $(CLEAN-OBJS)
.PHONY: clean
distclean: clean
if [ -z "$(target)" ]; then \
rm -f Makefile; \
rm -f config.log config.mk; \
rm -f vpx_config.[hc] vpx_config.asm; \
else \
rm -f $(target)-$(TOOLCHAIN).mk; \
fi
.PHONY: dist
dist:
.PHONY: exampletest
exampletest:
.PHONY: install
install::
.PHONY: test
test::
.PHONY: testdata
testdata::
.PHONY: utiltest
utiltest:
.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check
test-no-data-check::
exampletest-no-data-check utiltest-no-data-check:
# Force to realign stack always on OS/2
ifeq ($(TOOLCHAIN), x86-os2-gcc)
CFLAGS += -mstackrealign
endif
$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx
$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx
$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2
$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2
$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3
$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3
$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3
$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3
$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1
$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1
$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2
$(BUILD_PFX)%.c.d: %.c
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.c.o: %.c
$(if $(quiet),@echo " [CC] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $<
$(BUILD_PFX)%.cc.d: %.cc
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.cc.o: %.cc
$(if $(quiet),@echo " [CXX] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
$(BUILD_PFX)%.cpp.d: %.cpp
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.cpp.o: %.cpp
$(if $(quiet),@echo " [CXX] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
$(BUILD_PFX)%.asm.d: %.asm
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \
--build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@
$(BUILD_PFX)%.asm.o: %.asm
$(if $(quiet),@echo " [AS] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(AS) $(ASFLAGS) -o $@ $<
$(BUILD_PFX)%.S.d: %.S
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \
--build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@
$(BUILD_PFX)%.S.o: %.S
$(if $(quiet),@echo " [AS] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(AS) $(ASFLAGS) -o $@ $<
.PRECIOUS: %.c.S
%.c.S: CFLAGS += -DINLINE_ASM
$(BUILD_PFX)%.c.S: %.c
$(if $(quiet),@echo " [GEN] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CC) -S $(CFLAGS) -o $@ $<
.PRECIOUS: %.asm.S
$(BUILD_PFX)%.asm.S: %.asm
$(if $(quiet),@echo " [ASM CONVERSION] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(ASM_CONVERSION) <$< >$@
# If we're in debug mode, pretend we don't have GNU strip, to fall back to
# the copy implementation
HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP))
ifeq ($(HAVE_GNU_STRIP),yes)
# Older binutils strip global symbols not needed for relocation processing
# when given --strip-unneeded. Using nm and awk to identify globals and
# keep them caused command line length issues under mingw and segfaults in
# test_libvpx were observed under OS/2: simply use --strip-debug.
%.a: %_g.a
$(if $(quiet),@echo " [STRIP] $@ < $<")
$(qexec)$(STRIP) --strip-debug \
-o $@ $<
else
%.a: %_g.a
$(if $(quiet),@echo " [CP] $@ < $<")
$(qexec)cp $< $@
endif
#
# Utility functions
#
pairmap=$(if $(strip $(2)),\
$(call $(1),$(word 1,$(2)),$(word 2,$(2)))\
$(call pairmap,$(1),$(wordlist 3,$(words $(2)),$(2)))\
)
enabled=$(filter-out $($(1)-no),$($(1)-yes))
cond_enabled=$(if $(filter yes,$($(1))), $(call enabled,$(2)))
find_file1=$(word 1,$(wildcard $(subst //,/,$(addsuffix /$(1),$(2)))))
find_file=$(foreach f,$(1),$(call find_file1,$(strip $(f)),$(strip $(2))) )
obj_pats=.c=.c.o $(AS_SFX)=$(AS_SFX).o .cc=.cc.o .cpp=.cpp.o
objs=$(addprefix $(BUILD_PFX),$(foreach p,$(obj_pats),$(filter %.o,$(1:$(p))) ))
install_map_templates=$(eval $(call install_map_template,$(1),$(2)))
not=$(subst yes,no,$(1))
ifeq ($(CONFIG_MSVS),yes)
lib_file_name=$(1).lib
else
lib_file_name=lib$(1).a
endif
#
# Rule Templates
#
define linker_template
$(1): $(filter-out -%,$(2))
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
endef
define linkerxx_template
$(1): $(filter-out -%,$(2))
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
endef
# make-3.80 has a bug with expanding large input strings to the eval function,
# which was triggered in some cases by the following component of
# linker_template:
# $(1): $$(call find_file, $(patsubst -l%,lib%.a,$(filter -l%,$(2))),\
# $$(patsubst -L%,%,$$(filter -L%,$$(LDFLAGS) $(2))))
# This may be useful to revisit in the future (it tries to locate libraries
# in a search path and add them as prerequisites
define install_map_template
$(DIST_DIR)/$(1): $(2)
$(if $(quiet),@echo " [INSTALL] $$@")
$(qexec)mkdir -p $$(dir $$@)
$(qexec)cp $$< $$@
endef
define archive_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [AR] $$@")
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
endef
define so_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
#
# This needs further abstraction for dealing with non-GNU linkers.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -shared $$(LDFLAGS) \
-Wl,--no-undefined -Wl,-soname,$$(SONAME) \
-Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
$$(filter %.o,$$^) $$(extralibs)
endef
define dl_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -dynamiclib $$(LDFLAGS) \
-exported_symbols_list $$(EXPORTS_FILE) \
-Wl,-headerpad_max_install_names,-compatibility_version,1.0,-current_version,$$(VERSION_MAJOR) \
-o $$@ \
$$(filter %.o,$$^) $$(extralibs)
endef
define dll_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -Zdll $$(LDFLAGS) \
-o $$@ \
$$(filter %.o,$$^) $$(extralibs) $$(EXPORTS_FILE)
endef
#
# Get current configuration
#
ifneq ($(target),)
include $(SRC_PATH_BARE)/$(target:-$(TOOLCHAIN)=).mk
endif
skip_deps := $(filter %clean,$(MAKECMDGOALS))
skip_deps += $(findstring testdata,$(MAKECMDGOALS))
ifeq ($(strip $(skip_deps)),)
ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes)
# Older versions of make don't like -include directives with no arguments
ifneq ($(filter %.d,$(OBJS-yes:.o=.d)),)
-include $(filter %.d,$(OBJS-yes:.o=.d))
endif
endif
endif
#
# Configuration dependent rules
#
$(call pairmap,install_map_templates,$(INSTALL_MAPS))
DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,DOCS)
.docs: $(DOCS)
@touch $@
INSTALL-DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,INSTALL-DOCS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-DOCS+=$(call cond_enabled,CONFIG_INSTALL_DOCS,DIST-DOCS)
endif
.install-docs: .docs $(addprefix $(DIST_DIR)/,$(INSTALL-DOCS))
@touch $@
clean::
rm -f .docs .install-docs $(DOCS)
BINS=$(call enabled,BINS)
.bins: $(BINS)
@touch $@
INSTALL-BINS=$(call cond_enabled,CONFIG_INSTALL_BINS,INSTALL-BINS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-BINS+=$(call cond_enabled,CONFIG_INSTALL_BINS,DIST-BINS)
endif
.install-bins: .bins $(addprefix $(DIST_DIR)/,$(INSTALL-BINS))
@touch $@
clean::
rm -f .bins .install-bins $(BINS)
LIBS=$(call enabled,LIBS)
.libs: $(LIBS)
@touch $@
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS)
endif
.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS))
@touch $@
clean::
rm -f .libs .install-libs $(LIBS)
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
PROJECTS=$(call enabled,PROJECTS)
.projects: $(PROJECTS)
@touch $@
INSTALL-PROJECTS=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,INSTALL-PROJECTS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-PROJECTS+=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,DIST-PROJECTS)
endif
.install-projects: .projects $(addprefix $(DIST_DIR)/,$(INSTALL-PROJECTS))
@touch $@
clean::
rm -f .projects .install-projects $(PROJECTS)
endif
# If there are any source files to be distributed, then include the build
# system too.
ifneq ($(call enabled,DIST-SRCS),)
DIST-SRCS-yes += configure
DIST-SRCS-yes += build/make/configure.sh
DIST-SRCS-yes += build/make/gen_asm_deps.sh
DIST-SRCS-yes += build/make/Makefile
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh
DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2armasm_ms.pl
DIST-SRCS-$(ARCH_ARM) += build/make/thumb.pm
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
endif
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-SRCS += $(call cond_enabled,CONFIG_INSTALL_SRCS,DIST-SRCS)
endif
.install-srcs: $(addprefix $(DIST_DIR)/src/,$(INSTALL-SRCS))
@touch $@
clean::
rm -f .install-srcs
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
BUILD_TARGETS += .projects
INSTALL_TARGETS += .install-projects
endif
BUILD_TARGETS += .docs .libs .bins
INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins
all: $(BUILD_TARGETS)
install:: $(INSTALL_TARGETS)
dist: $(INSTALL_TARGETS)
test::
.SUFFIXES: # Delete default suffix rules
Distribution: Ubuntu, mainly. Too much stuff works out of the box O.o
Posts: 71
Rep:
Quote:
Originally Posted by percy_vere_uk
Building directly from blfs 8.1 book {bypassing jhalfs}
The build instructions are:
Installation of libvpx
Install libvpx by running the following commands:
Code:
sed -i 's/cp -p/cp/' build/make/Makefile &&
mkdir libvpx-build &&
cd libvpx-build &&
../configure --prefix=/usr \
--enable-shared \
--disable-static &&
make
This package does not come with a test suite.
Now, as the root user:
make install
libvpx-1.6.1 builds successfully
I also built gst-plugins-good-1.12.2 from book which depends on libvpx-1.6.1 and is the next build script in the jhalfs list. This builds successfully as well. I do not see why jhalfs is wanting to build libvpx. I assume that re-building the blfs_root directory means that it will see that libvpx-1.6.1 is already built.
Returning to jhalfs having now re-built jhalfs blfs_root directory for a clean start.
Code:
cd /home/graham/blfs_root
make {select app to install} KDE ---> Introduction to KDE ---> *selected all
exit
cd /home/graham/blfs_root/work
../gen-makefile.sh
sudo make
Part error log as there are many references to missing ./vpx_config.h :
Code:
In file included from ../test/vp9_skip_loopfilter_test.cc:13:0:
../test/codec_factory.h:13:10: fatal error: ./vpx_config.h: No such file or directory
#include "./vpx_config.h"
^~~~~~~~~~~~~~~~
I have used this standard format for jhalfs builds many times before and never experienced a problem other than minor script changes.
/sources/libvpx-1.6.1/libvpx-build/Makefile As built from book
Code:
##
## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
include config.mk
quiet?=true
ifeq ($(target),)
# If a target wasn't specified, invoke for all enabled targets.
.DEFAULT:
@for t in $(ALL_TARGETS); do \
$(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\
done
all: .DEFAULT
clean:: .DEFAULT
exampletest: .DEFAULT
install:: .DEFAULT
test:: .DEFAULT
test-no-data-check:: .DEFAULT
testdata:: .DEFAULT
utiltest: .DEFAULT
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
test_%: .DEFAULT ;
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
# installed on cygwin, so we need to autodetect here.
md5sum := $(firstword $(wildcard \
$(foreach e,md5sum openssl,\
$(foreach p,$(subst :, ,$(PATH)),$(p)/$(e)*))\
))
md5sum := $(if $(filter %openssl,$(md5sum)),$(md5sum) dgst -md5,$(md5sum))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
dist:
@for t in $(ALL_TARGETS); do \
$(MAKE) --no-print-directory target=$$t $(MAKECMDGOALS) || exit $$?;\
done
# Run configure for the user with the current toolchain.
@if [ -d "$(DIST_DIR)/src" ]; then \
mkdir -p "$(DIST_DIR)/build"; \
cd "$(DIST_DIR)/build"; \
echo "Rerunning configure $(CONFIGURE_ARGS)"; \
../src/configure $(CONFIGURE_ARGS); \
$(if $(filter vs%,$(TGT_CC)),make NO_LAUNCH_DEVENV=1;) \
fi
@if [ -d "$(DIST_DIR)" ]; then \
echo " [MD5SUM] $(DIST_DIR)"; \
cd $(DIST_DIR) && \
$(md5sum) `find . -name md5sums.txt -prune -o -type f -print` \
| sed -e 's/MD5(\(.*\))= \([0-9a-f]\{32\}\)/\2 \1/' \
> md5sums.txt;\
fi
endif
# Since we invoke make recursively for multiple targets we need to include the
# .mk file for the correct target, but only when $(target) is non-empty.
ifneq ($(target),)
include $(target)-$(TOOLCHAIN).mk
endif
BUILD_ROOT?=.
VPATH=$(SRC_PATH_BARE)
CFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH)
CXXFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT) -I$(SRC_PATH)
ASFLAGS+=-I$(BUILD_PFX)$(BUILD_ROOT)/ -I$(SRC_PATH)/
DIST_DIR?=dist
HOSTCC?=gcc
TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN)))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
quiet:=$(if $(or $(verbose), $(V)),, yes)
qexec=$(if $(quiet),@)
# Cancel built-in implicit rules
%: %.o
%.asm:
%.a:
%: %.cc
#
# Common rules"
#
.PHONY: all
all:
.PHONY: clean
clean::
rm -f $(OBJS-yes) $(OBJS-yes:.o=.d) $(OBJS-yes:.asm.S.o=.asm.S)
rm -f $(CLEAN-OBJS)
.PHONY: clean
distclean: clean
if [ -z "$(target)" ]; then \
rm -f Makefile; \
rm -f config.log config.mk; \
rm -f vpx_config.[hc] vpx_config.asm; \
else \
rm -f $(target)-$(TOOLCHAIN).mk; \
fi
.PHONY: dist
dist:
.PHONY: exampletest
exampletest:
.PHONY: install
install::
.PHONY: test
test::
.PHONY: testdata
testdata::
.PHONY: utiltest
utiltest:
.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check
test-no-data-check::
exampletest-no-data-check utiltest-no-data-check:
# Force to realign stack always on OS/2
ifeq ($(TOOLCHAIN), x86-os2-gcc)
CFLAGS += -mstackrealign
endif
$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx
$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx
$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2
$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2
$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3
$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3
$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3
$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3
$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1
$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1
$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2
$(BUILD_PFX)%.c.d: %.c
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.c.o: %.c
$(if $(quiet),@echo " [CC] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $<
$(BUILD_PFX)%.cc.d: %.cc
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.cc.o: %.cc
$(if $(quiet),@echo " [CXX] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
$(BUILD_PFX)%.cpp.d: %.cpp
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -M $< | $(fmt_deps) > $@
$(BUILD_PFX)%.cpp.o: %.cpp
$(if $(quiet),@echo " [CXX] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
$(BUILD_PFX)%.asm.d: %.asm
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \
--build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@
$(BUILD_PFX)%.asm.o: %.asm
$(if $(quiet),@echo " [AS] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(AS) $(ASFLAGS) -o $@ $<
$(BUILD_PFX)%.S.d: %.S
$(if $(quiet),@echo " [DEP] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \
--build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@
$(BUILD_PFX)%.S.o: %.S
$(if $(quiet),@echo " [AS] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(AS) $(ASFLAGS) -o $@ $<
.PRECIOUS: %.c.S
%.c.S: CFLAGS += -DINLINE_ASM
$(BUILD_PFX)%.c.S: %.c
$(if $(quiet),@echo " [GEN] $@")
$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
$(qexec)$(CC) -S $(CFLAGS) -o $@ $<
.PRECIOUS: %.asm.S
$(BUILD_PFX)%.asm.S: %.asm
$(if $(quiet),@echo " [ASM CONVERSION] $@")
$(qexec)mkdir -p $(dir $@)
$(qexec)$(ASM_CONVERSION) <$< >$@
# If we're in debug mode, pretend we don't have GNU strip, to fall back to
# the copy implementation
HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP))
ifeq ($(HAVE_GNU_STRIP),yes)
# Older binutils strip global symbols not needed for relocation processing
# when given --strip-unneeded. Using nm and awk to identify globals and
# keep them caused command line length issues under mingw and segfaults in
# test_libvpx were observed under OS/2: simply use --strip-debug.
%.a: %_g.a
$(if $(quiet),@echo " [STRIP] $@ < $<")
$(qexec)$(STRIP) --strip-debug \
-o $@ $<
else
%.a: %_g.a
$(if $(quiet),@echo " [CP] $@ < $<")
$(qexec)cp $< $@
endif
#
# Utility functions
#
pairmap=$(if $(strip $(2)),\
$(call $(1),$(word 1,$(2)),$(word 2,$(2)))\
$(call pairmap,$(1),$(wordlist 3,$(words $(2)),$(2)))\
)
enabled=$(filter-out $($(1)-no),$($(1)-yes))
cond_enabled=$(if $(filter yes,$($(1))), $(call enabled,$(2)))
find_file1=$(word 1,$(wildcard $(subst //,/,$(addsuffix /$(1),$(2)))))
find_file=$(foreach f,$(1),$(call find_file1,$(strip $(f)),$(strip $(2))) )
obj_pats=.c=.c.o $(AS_SFX)=$(AS_SFX).o .cc=.cc.o .cpp=.cpp.o
objs=$(addprefix $(BUILD_PFX),$(foreach p,$(obj_pats),$(filter %.o,$(1:$(p))) ))
install_map_templates=$(eval $(call install_map_template,$(1),$(2)))
not=$(subst yes,no,$(1))
ifeq ($(CONFIG_MSVS),yes)
lib_file_name=$(1).lib
else
lib_file_name=lib$(1).a
endif
#
# Rule Templates
#
define linker_template
$(1): $(filter-out -%,$(2))
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
endef
define linkerxx_template
$(1): $(filter-out -%,$(2))
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
endef
# make-3.80 has a bug with expanding large input strings to the eval function,
# which was triggered in some cases by the following component of
# linker_template:
# $(1): $$(call find_file, $(patsubst -l%,lib%.a,$(filter -l%,$(2))),\
# $$(patsubst -L%,%,$$(filter -L%,$$(LDFLAGS) $(2))))
# This may be useful to revisit in the future (it tries to locate libraries
# in a search path and add them as prerequisites
define install_map_template
$(DIST_DIR)/$(1): $(2)
$(if $(quiet),@echo " [INSTALL] $$@")
$(qexec)mkdir -p $$(dir $$@)
$(qexec)cp $$< $$@
endef
define archive_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [AR] $$@")
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
endef
define so_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
#
# This needs further abstraction for dealing with non-GNU linkers.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -shared $$(LDFLAGS) \
-Wl,--no-undefined -Wl,-soname,$$(SONAME) \
-Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
$$(filter %.o,$$^) $$(extralibs)
endef
define dl_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -dynamiclib $$(LDFLAGS) \
-exported_symbols_list $$(EXPORTS_FILE) \
-Wl,-headerpad_max_install_names,-compatibility_version,1.0,-current_version,$$(VERSION_MAJOR) \
-o $$@ \
$$(filter %.o,$$^) $$(extralibs)
endef
define dll_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
# for creating them.
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -Zdll $$(LDFLAGS) \
-o $$@ \
$$(filter %.o,$$^) $$(extralibs) $$(EXPORTS_FILE)
endef
#
# Get current configuration
#
ifneq ($(target),)
include $(SRC_PATH_BARE)/$(target:-$(TOOLCHAIN)=).mk
endif
skip_deps := $(filter %clean,$(MAKECMDGOALS))
skip_deps += $(findstring testdata,$(MAKECMDGOALS))
ifeq ($(strip $(skip_deps)),)
ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes)
# Older versions of make don't like -include directives with no arguments
ifneq ($(filter %.d,$(OBJS-yes:.o=.d)),)
-include $(filter %.d,$(OBJS-yes:.o=.d))
endif
endif
endif
#
# Configuration dependent rules
#
$(call pairmap,install_map_templates,$(INSTALL_MAPS))
DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,DOCS)
.docs: $(DOCS)
@touch $@
INSTALL-DOCS=$(call cond_enabled,CONFIG_INSTALL_DOCS,INSTALL-DOCS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-DOCS+=$(call cond_enabled,CONFIG_INSTALL_DOCS,DIST-DOCS)
endif
.install-docs: .docs $(addprefix $(DIST_DIR)/,$(INSTALL-DOCS))
@touch $@
clean::
rm -f .docs .install-docs $(DOCS)
BINS=$(call enabled,BINS)
.bins: $(BINS)
@touch $@
INSTALL-BINS=$(call cond_enabled,CONFIG_INSTALL_BINS,INSTALL-BINS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-BINS+=$(call cond_enabled,CONFIG_INSTALL_BINS,DIST-BINS)
endif
.install-bins: .bins $(addprefix $(DIST_DIR)/,$(INSTALL-BINS))
@touch $@
clean::
rm -f .bins .install-bins $(BINS)
LIBS=$(call enabled,LIBS)
.libs: $(LIBS)
@touch $@
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
$(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS)
endif
.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS))
@touch $@
clean::
rm -f .libs .install-libs $(LIBS)
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
PROJECTS=$(call enabled,PROJECTS)
.projects: $(PROJECTS)
@touch $@
INSTALL-PROJECTS=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,INSTALL-PROJECTS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-PROJECTS+=$(call cond_enabled,CONFIG_INSTALL_PROJECTS,DIST-PROJECTS)
endif
.install-projects: .projects $(addprefix $(DIST_DIR)/,$(INSTALL-PROJECTS))
@touch $@
clean::
rm -f .projects .install-projects $(PROJECTS)
endif
# If there are any source files to be distributed, then include the build
# system too.
ifneq ($(call enabled,DIST-SRCS),)
DIST-SRCS-yes += configure
DIST-SRCS-yes += build/make/configure.sh
DIST-SRCS-yes += build/make/gen_asm_deps.sh
DIST-SRCS-yes += build/make/Makefile
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh
DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2armasm_ms.pl
DIST-SRCS-$(ARCH_ARM) += build/make/thumb.pm
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
endif
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
ifeq ($(MAKECMDGOALS),dist)
INSTALL-SRCS += $(call cond_enabled,CONFIG_INSTALL_SRCS,DIST-SRCS)
endif
.install-srcs: $(addprefix $(DIST_DIR)/src/,$(INSTALL-SRCS))
@touch $@
clean::
rm -f .install-srcs
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
BUILD_TARGETS += .projects
INSTALL_TARGETS += .install-projects
endif
BUILD_TARGETS += .docs .libs .bins
INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins
all: $(BUILD_TARGETS)
install:: $(INSTALL_TARGETS)
dist: $(INSTALL_TARGETS)
test::
.SUFFIXES: # Delete default suffix rules
I'm sure the makefile is fine and the build process is fine.
What I meant was run the configure script manually and post the output it prints to the terminal, not the Makefile. Only run the configure portion by itself, not the whole 002-z-libvpx script, then investigate the aftermath.
So just in the libvpx source dir run the following:
Let's see what it prints to the terminal, since this is what will generate the vpx_config.h file.
Perhaps it's failing for some reason before it's getting to generate the vpx_config.h file, or something of that nature. There should be some info there as to why the file isn't generated. If it works, it may just be a problem with the way configure is being called from 002-z-libvpx and may need a small tweak.
Let's see what it prints to the terminal, since this is what will generate the vpx_config.h file.
Perhaps it's failing for some reason before it's getting to generate the vpx_config.h file, or something of that nature.
There should be some info there as to why the file isn't generated. If it works, it may just be a problem with the way configure is being called from 002-z-libvpx and may need a small tweak.
Code:
/sources/libvpx-1.6.1
$ ./configure --prefix=/usr --enable-shared --disable-static
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.iso88591"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
enabling shared
disabling static
enabling vp8_encoder
enabling vp8_decoder
enabling vp9_encoder
enabling vp9_decoder
Configuring for target 'x86_64-linux-gcc'
enabling x86_64
enabling pic
enabling runtime_cpu_detect
enabling mmx
enabling sse
enabling sse2
enabling sse3
enabling ssse3
enabling sse4_1
enabling avx
enabling avx2
using yasm
enabling postproc
enabling unit_tests
enabling webm_io
enabling libyuv
Creating makefiles for x86_64-linux-gcc libs
Creating makefiles for x86_64-linux-gcc examples
Creating makefiles for x86_64-linux-gcc tools
Creating makefiles for x86_64-linux-gcc docs
/sources/libvpx-1.6.1_old3 ]$[
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.