All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] I have a problem adding new package
@ 2022-01-30 22:09 Arek Marud
  2022-01-30 22:48 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Arek Marud @ 2022-01-30 22:09 UTC (permalink / raw)
  To: buildroot

Hi, 

I'm trying to add new package to Buildroot. I follow Buildroot tutorial
for autotools package. But I got an error message, and i have no idea
what is the problem.

https://gist.github.com/arekmd/c33a3a487ec73d8847c3c115f8fa3299

Best regards 
Arek

################################################################################
#
# libonvif
################################################################################
LIBONVIF_VERSION = 1.1.1
LIBONVIF_SOURCE = v$(LIBONVIF_VERSION).tar.gz
LIBONVIF_SITE = https://github.com/sr99622/libonvif/archive/refs/tags
LIBONVIF_INSTALL_STAGING = YES
LIBONVIF_INSTALL_TARGET = YES
LIBONVIF_CONF_OPTS = --with-libxml2 --includedir="$(STAGING_DIR)/usr/include/libxml2" 
LIBONVIF_DEPENDENCIES = libxml2 host-pkgconf

$(eval $(autotools-package))

------------------------------------------------------------------------------------------
- Config.in
------------------------------------------------------------------------------------------
config BR2_PACKAGE_LIBONVIF
        bool "libonvif"
        select BR2_PACKAGE_LIBXML2
        help
          libonvif  ONVIF library

          https://github.com/sr99622/libonvif

------------------------------------------------------------------------------------------
--- Error message
------------------------------------------------------------------------------------------



myname buildroot$>make
>>> libonvif 0.0.0 Installing to staging directory
PATH="/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/bin:/home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/sbin:/home/myname/.local/bin:/home/myname/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/
vendor_perl:/usr/bin/core_perl"  /usr/bin/make -j5 DESTDIR=/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux
-gnu/sysroot install -C /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/
make[1]: Entering directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
Making install in build
make[2]: Entering directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/build'
make[3]: Entering directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/build'
 /usr/bin/mkdir -p '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libonvif.la '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch6
4-myproj-linux-gnu/sysroot/usr/lib'
 /usr/bin/mkdir -p '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/lib/pkgconfig'
 /usr/bin/mkdir -p '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/home/myname/workbench/resour
ces/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/include/libxml2/libonvif'
 /usr/bin/install -c -m 644 libonvif.pc '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/l
ib/pkgconfig'
 /usr/bin/install -c -m 644 ../source/onvif.h ../source/sha1.h ../source/cencode.h '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output
/host/aarch64-myproj-linux-gnu/sysroot/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/inclu
de/libxml2/libonvif'
libtool: install: /usr/bin/install -c .libs/libonvif.so.0.0.0 /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-li
nux-gnu/sysroot/usr/lib/libonvif.so.0.0.0
libtool: install: (cd /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/lib && { ln -s -f li
bonvif.so.0.0.0 libonvif.so.0 || { rm -f libonvif.so.0 && ln -s libonvif.so.0.0.0 libonvif.so.0; }; })
libtool: install: (cd /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/lib && { ln -s -f li
bonvif.so.0.0.0 libonvif.so || { rm -f libonvif.so && ln -s libonvif.so.0.0.0 libonvif.so; }; })
libtool: install: /usr/bin/install -c .libs/libonvif.lai /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-g
nu/sysroot/usr/lib/libonvif.la
libtool: warning: remember to run 'libtool --finish /usr/lib'
make[3]: Leaving directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/build'
make[2]: Leaving directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/build'
make[2]: Entering directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
make[3]: Entering directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/share/doc/libonvif'
 /usr/bin/install -c -m 644 README '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/share/
doc/libonvif'
make[3]: Leaving directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
make[2]: Leaving directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
make[1]: Leaving directory '/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0'
>>> libonvif 0.0.0 Fixing libtool files
for la in $(find /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot/usr/lib* -name "*.la"); do \
        cp -a "${la}" "${la}.fixed" && \
        /usr/bin/sed -i -e "s:/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output:@BASE_DIR@:g" \
                -e "s:/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot:@STAGING_DIR@:g" \
                 \
                -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \
                -e "s:\(['= ]\)/lib:\\1@STAGING_DIR@/lib:g" \
                 \
                -e "s:@STAGING_DIR@:/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot:g" \
                -e "s:@BASE_DIR@:/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output:g" \
                "${la}.fixed" && \
        if cmp -s "${la}" "${la}.fixed"; then \
                rm -f "${la}.fixed"; \
        else \
                mv "${la}.fixed" "${la}"; \
        fi || exit 1; \
done
libonvif: installs files in /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot//home/myname/workben
ch/resources/development/myproj/buildroot/buildroot/output
make: *** [package/pkg-generic.mk:339: /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/build/libonvif-0.0.0/.stamp_staging_installe
d] Error 1
myname buildroot$> 


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] I have a problem adding new package
  2022-01-30 22:09 [Buildroot] I have a problem adding new package Arek Marud
@ 2022-01-30 22:48 ` Thomas Petazzoni via buildroot
  2022-02-04 10:22   ` Arek Marud
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-01-30 22:48 UTC (permalink / raw)
  To: Arek Marud; +Cc: buildroot

Hello Arek,

On Sun, 30 Jan 2022 23:09:50 +0100
Arek Marud <a.marud@post.pl> wrote:

> I'm trying to add new package to Buildroot. I follow Buildroot tutorial
> for autotools package. But I got an error message, and i have no idea
> what is the problem.
> 
> https://gist.github.com/arekmd/c33a3a487ec73d8847c3c115f8fa3299

libonvif: installs files in /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot//home/myname/workbench/resources/development/myproj/buildroot/buildroot/output

Look at this path: it contains two times
/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output,
and that's clearly bogus, and that's why Buildroot complains.

> ################################################################################
> #
> # libonvif
> ################################################################################
> LIBONVIF_VERSION = 1.1.1
> LIBONVIF_SOURCE = v$(LIBONVIF_VERSION).tar.gz
> LIBONVIF_SITE = https://github.com/sr99622/libonvif/archive/refs/tags
> LIBONVIF_INSTALL_STAGING = YES
> LIBONVIF_INSTALL_TARGET = YES
> LIBONVIF_CONF_OPTS = --with-libxml2 --includedir="$(STAGING_DIR)/usr/include/libxml2" 

This includedir is wrong, and is perhaps the reason for the failure.
includedir is the location where libonvif will install its headers, not
where the libxml2 headers will be found. And setting
$(STAGING_DIR)/usr/include/libxml2 for includedir is incorrect, because
then at install time we pass DESTDIR=$(TARGET_DIR) (for target
installation) or DESTDIR=$(STAGING_DIR) (for staging installation).

This means that the libonvif headers will get installed in:

 $(TARGET_DIR)/$(STAGING_DIR)/usr/include/libxml2
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the value you passed to includedir

and

 $(STAGING_DIR)/$(STAGING_DIR)/usr/include/libxml2
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the value you passed to includedir

Hope this helps,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] I have a problem adding new package
  2022-01-30 22:48 ` Thomas Petazzoni via buildroot
@ 2022-02-04 10:22   ` Arek Marud
  2022-02-06 11:31     ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Arek Marud @ 2022-02-04 10:22 UTC (permalink / raw)
  To: buildroot

Helo Thomas, 

Thank you for your answer. 
I had a problem with libonvif compilation. Compiler complaing about
unsafe include path (details pasted below). 

I was able to compile project ONLY when --includedir parameter was set, 
without it - compiler complains about include path.

https://gist.github.com/arekmd/11e9621ae3fc476cf37e80150d15b177

I pasted build log without LIBONVIF_CONF_OPTS line.


myname buildroot$> make libonvif-build
WARNING: no hash file for v1.1.1.tar.gz
>>> libonvif 1.1.1 Extracting
gzip -d -c /home/myname/workbench/resources/development/myproj/buildroot/buildroot/
dl/libonvif/v1.1.1.tar.gz | tar --strip-components=1 -C /home/myname/workbench/res
ources/development/myproj/buildroot/buildroot/output/build/libonvif-1.1.1   -xf -
>>> libonvif 1.1.1 Patching
>>> libonvif 1.1.1 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/myname/workbench/res
ources/development/myproj/buildroot/buildroot/output/build/libonvif-1.1.1 -name $
file); do cp support/gnuconfig/$file $i; done; done
>>> libonvif 1.1.1 Patching libtool
patching file /home/myname/workbench/resources/development/myproj/buildroot/buildro
ot/output/build/libonvif-1.1.1/ltmain.sh
Hunk #1 succeeded at 2694 (offset 7 lines).
Hunk #2 succeeded at 4284 (offset 7 lines).
Hunk #3 succeeded at 6579 (offset 25 lines).
Hunk #4 succeeded at 6589 (offset 25 lines).
Hunk #5 succeeded at 6882 (offset 25 lines).
Hunk #6 succeeded at 7174 (offset 25 lines).
Hunk #7 succeeded at 8140 (offset 28 lines).
Hunk #8 succeeded at 10769 (offset 59 lines).
>>> libonvif 1.1.1 Configuring
(cd /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/
build/libonvif-1.1.1/ && rm -rf config.cache && PATH="/home/myname/workbench/resou
rces/development/myproj/buildroot/buildroot/output/host/bin:/home/myname/workbench/
resources/development/myproj/buildroot/buildroot/output/host/sbin:/home/myname/.loc
al/bin:/home/myname/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/fl
atpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" AR
="/home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/ho
st/bin/aarch64-myproj-linux-gnu-ar" AS="/home/myname/workbench/resources/developmen
t/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-as" LD="/hom
e/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/bin
/aarch64-myproj-linux-gnu-ld" NM="/home/myname/workbench/resources/development/auvi
c/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-nm" CC="/home/myname
/workbench/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch
64-myproj-linux-gnu-gcc" GCC="/home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc" CPP="/home/myname/w
orkbench/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch64
-myproj-linux-gnu-cpp" CXX="/home/myname/workbench/resources/development/myproj/buil
droot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-g++" FC="/home/myname/work
bench/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch64-Au
vic-linux-gnu-gfortran" F77="/home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gfortran" RANLIB="/hom
e/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/bin
/aarch64-myproj-linux-gnu-ranlib" READELF="/home/myname/workbench/resources/develop
ment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-readelf"
STRIP="/home/myname/workbench/resources/development/myproj/buildroot/buildroot/outp
ut/host/bin/aarch64-myproj-linux-gnu-strip" OBJCOPY="/home/myname/workbench/resourc
es/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu
-objcopy" OBJDUMP="/home/myname/workbench/resources/development/myproj/buildroot/bu
ildroot/output/host/bin/aarch64-myproj-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/
ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/b
in/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUI
LD="-I/home/myname/workbench/resources/development/myproj/buildroot/buildroot/outpu
t/host/include" CFLAGS_FOR_BUILD="-O2 -I/home/myname/workbench/resources/developme
nt/myproj/buildroot/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/hom
e/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/inc
lude" LDFLAGS_FOR_BUILD="-L/home/myname/workbench/resources/development/myproj/buil
droot/buildroot/output/host/lib -Wl,-rpath,/home/myname/workbench/resources/develo
pment/myproj/buildroot/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_AS
SEMBLER="/home/myname/workbench/resources/development/myproj/buildroot/buildroot/ou
tput/host/bin/aarch64-myproj-linux-gnu-as" DEFAULT_LINKER="/home/myname/workbench/r
esources/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-lin
ux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BI
TS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 -Os -g0 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BI
TS=64  -Os -g0 " LDFLAGS="" FCFLAGS=" -Os -g0" FFLAGS=" -Os -g0" PKG_CONFIG="/ho
me/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/bi
n/pkg-config" STAGING_DIR="/home/myname/workbench/resources/development/myproj/buil
droot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot" INTLTOOL_PERL=/usr/
bin/perl ac_cv_lbl_unaligned_fail=yes ac_cv_func_mmap_fixed_mapped=yes ac_cv_fun
c_memcmp_working=yes ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes
ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes ac_cv_func_reall
oc_0_nonnull=yes lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no   CONFIG
_SITE=/dev/null ./configure --target=aarch64-myproj-linux-gnu --host=aarch64-Auvi
c-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysco
nfdir=/etc --localstatedir=/var --program-prefix="" --disable-gtk-doc --disable-
gtk-doc-html --disable-doc --disable-docs --disable-documentation --with-xmlto=n
o --with-fop=no --disable-dependency-tracking --enable-ipv6 --disable-nls --disa
ble-static --enable-shared   )
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-gtk-doc-h
tml, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --wit
h-fop, --enable-ipv6, --disable-nls
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-myproj-linux-gnu-strip... /home/myname/workbench/resources/dev
elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for aarch64-myproj-linux-gnu-gcc... /home/myname/workbench/resources/devel
opment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/myname/workbench/resources/development/myproj/buildroot/buil
droot/output/host/bin/aarch64-myproj-linux-gnu-gcc accepts -g... yes
checking for /home/myname/workbench/resources/development/myproj/buildroot/buildroo
t/output/host/bin/aarch64-myproj-linux-gnu-gcc option to accept ISO C89... none n
eeded
checking whether /home/myname/workbench/resources/development/myproj/buildroot/buil
droot/output/host/bin/aarch64-myproj-linux-gnu-gcc understands -c and -o together
... yes
checking dependency style of /home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc... none
checking for aarch64-myproj-linux-gnu-ar... /home/myname/workbench/resources/develo
pment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-ar
checking the archiver (/home/myname/workbench/resources/development/myproj/buildroo
t/buildroot/output/host/bin/aarch64-myproj-linux-gnu-ar) interface... ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-myproj-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/myname/workbench/resources/development/myproj/buildro
ot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc... /home/myname/workbench
/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-l
inux-gnu-ld
checking if the linker (/home/myname/workbench/resources/development/myproj/buildro
ot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/myname/workbench/reso
urces/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-
gnu-nm
checking the name lister (/home/myname/workbench/resources/development/myproj/build
root/buildroot/output/host/bin/aarch64-myproj-linux-gnu-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to aarch64-myproj-linux-gn
u format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... fu
nc_convert_file_noop
checking for /home/myname/workbench/resources/development/myproj/buildroot/buildroo
t/output/host/bin/aarch64-myproj-linux-gnu-ld option to reload object files... -r
checking for aarch64-myproj-linux-gnu-objdump... /home/myname/workbench/resources/d
evelopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-obj
dump
checking how to recognize dependent libraries... pass_all
checking for aarch64-myproj-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for aarch64-myproj-linux-gnu-ar... (cached) /home/myname/workbench/resourc
es/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu
-ar
checking for archiver @FILE support... @
checking for aarch64-myproj-linux-gnu-strip... (cached) /home/myname/workbench/reso
urces/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-
gnu-strip
checking for aarch64-myproj-linux-gnu-ranlib... /home/myname/workbench/resources/de
velopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-ranl
ib
checking command to parse /home/myname/workbench/resources/development/myproj/build
root/buildroot/output/host/bin/aarch64-myproj-linux-gnu-nm output from /home/myname
/workbench/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch
64-myproj-linux-gnu-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for aarch64-myproj-linux-gnu-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... /home/myname/workbench/resources/develop
ment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/bin/aarch64-myproj-linux-gnu-gcc supports -fno-rtti -fno-exceptions.
.. no
checking for /home/myname/workbench/resources/development/myproj/buildroot/buildroo
t/output/host/bin/aarch64-myproj-linux-gnu-gcc option to produce PIC... -fPIC -DP
IC
checking if /home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/bin/aarch64-myproj-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if /home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/bin/aarch64-myproj-linux-gnu-gcc static flag -static works... yes
checking if /home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/bin/aarch64-myproj-linux-gnu-gcc supports -c -o file.o... yes
checking if /home/myname/workbench/resources/development/myproj/buildroot/buildroot
/output/host/bin/aarch64-myproj-linux-gnu-gcc supports -c -o file.o... (cached) y
es
checking whether the /home/myname/workbench/resources/development/myproj/buildroot/
buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc linker (/home/myname/workben
ch/resources/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj
-linux-gnu-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
host is aarch64-myproj-linux-gnu
checking for aarch64-myproj-linux-gnu-gcc... (cached) /home/myname/workbench/resour
ces/development/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gn
u-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /home/myname/workbench/resources/development/myproj/buildroot/buil
droot/output/host/bin/aarch64-myproj-linux-gnu-gcc accepts -g... (cached) yes
checking for /home/myname/workbench/resources/development/myproj/buildroot/buildroo
t/output/host/bin/aarch64-myproj-linux-gnu-gcc option to accept ISO C89... (cache
d) none needed
checking whether /home/myname/workbench/resources/development/myproj/buildroot/buil
droot/output/host/bin/aarch64-myproj-linux-gnu-gcc understands -c and -o together
... (cached) yes
checking dependency style of /home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc... (cached) none
checking pkg-config is at least version 0.9.0... yes
checking for LIBXML2... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for memory.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for working strtod... no
checking for pow... no
checking for pow in -lm... yes
checking for ftime... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for localtime_r... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtod... (cached) no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating build/Makefile
config.status: creating build/libonvif.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --disable-gtk-doc, --disable-gtk-doc-h
tml, --disable-doc, --disable-docs, --disable-documentation, --with-xmlto, --wit
h-fop, --enable-ipv6, --disable-nls
>>> libonvif 1.1.1 Building
PATH="/home/myname/workbench/resources/development/myproj/buildroot/buildroot/outpu
t/host/bin:/home/myname/workbench/resources/development/myproj/buildroot/buildroot/
output/host/sbin:/home/myname/.local/bin:/home/myname/.local/bin:/usr/local/sbin:/us
r/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/ve
ndor_perl:/usr/bin/core_perl"  /usr/bin/make -j5  -C /home/myname/workbench/resour
ces/development/myproj/buildroot/buildroot/output/build/libonvif-1.1.1/
make[1]: Entering directory '/home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/build/libonvif-1.1.1'
/usr/bin/make  all-recursive
make[2]: Entering directory '/home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/build/libonvif-1.1.1'
Making all in build
make[3]: Entering directory '/home/myname/workbench/resources/development/myproj/bu
ildroot/buildroot/output/build/libonvif-1.1.1/build'
/bin/sh ../libtool  --tag=CC   --mode=compile /home/myname/workbench/resources/dev
elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -
DHAVE_CONFIG_H -I. -I..   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFS
ET_BITS=64 -I/usr/include -I/usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE
 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o onvif.lo `test -f
'../source/onvif.c' || echo './'`../source/onvif.c
/bin/sh ../libtool  --tag=CC   --mode=compile /home/myname/workbench/resources/dev
elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -
DHAVE_CONFIG_H -I. -I..   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFS
ET_BITS=64 -I/usr/include -I/usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE
 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o sha1.lo `test -f '
../source/sha1.c' || echo './'`../source/sha1.c
/bin/sh ../libtool  --tag=CC   --mode=compile /home/myname/workbench/resources/dev
elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -
DHAVE_CONFIG_H -I. -I..   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFS
ET_BITS=64 -I/usr/include -I/usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE
 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o cencode.lo `test -
f '../source/cencode.c' || echo './'`../source/cencode.c
libtool: compile:  /home/myname/workbench/resources/development/myproj/buildroot/bu
ildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_
LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I/
usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FIL
E_OFFSET_BITS=64 -Os -g0 -c ../source/onvif.c  -fPIC -DPIC -o .libs/onvif.o
aarch64-myproj-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-com
pilation: '-I/usr/include'
make[3]: *** [Makefile:459: onvif.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile:  /home/myname/workbench/resources/development/myproj/buildroot/bu
ildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_
LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I/
usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FIL
E_OFFSET_BITS=64 -Os -g0 -c ../source/cencode.c  -fPIC -DPIC -o .libs/cencode.o
aarch64-myproj-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-com
pilation: '-I/usr/include'
make[3]: *** [Makefile:473: cencode.lo] Error 1
libtool: compile:  /home/myname/workbench/resources/development/myproj/buildroot/bu
ildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_
LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I/
usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FIL
E_OFFSET_BITS=64 -Os -g0 -c ../source/sha1.c  -fPIC -DPIC -o .libs/sha1.o
aarch64-myproj-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-com
pilation: '-I/usr/include'
make[3]: *** [Makefile:466: sha1.lo] Error 1
make[3]: Leaving directory '/home/myname/workbench/resources/development/myproj/bui
ldroot/buildroot/output/build/libonvif-1.1.1/build'
make[2]: *** [Makefile:454: all-recursive] Error 1
make[2]: Leaving directory '/home/myname/workbench/resources/development/myproj/bui
ldroot/buildroot/output/build/libonvif-1.1.1'
make[1]: *** [Makefile:365: all] Error 2
make[1]: Leaving directory '/home/myname/workbench/resources/development/myproj/bui
ldroot/buildroot/output/build/libonvif-1.1.1'
make: *** [package/pkg-generic.mk:295: /home/myname/workbench/resources/developmen
t/myproj/buildroot/buildroot/output/build/libonvif-1.1.1/.stamp_built] Error 2
myname buildroot$>





Dnia Sun, Jan 30, 2022 at 11:48:00PM +0100, Thomas Petazzoni napisał(a):
> Hello Arek,
> 
> On Sun, 30 Jan 2022 23:09:50 +0100
> Arek Marud <a.marud@post.pl> wrote:
> 
> > I'm trying to add new package to Buildroot. I follow Buildroot tutorial
> > for autotools package. But I got an error message, and i have no idea
> > what is the problem.
> > 
> > https://gist.github.com/arekmd/c33a3a487ec73d8847c3c115f8fa3299
> 
> libonvif: installs files in /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output/host/aarch64-myproj-linux-gnu/sysroot//home/myname/workbench/resources/development/myproj/buildroot/buildroot/output
> 
> Look at this path: it contains two times
> /home/myname/workbench/resources/development/myproj/buildroot/buildroot/output,
> and that's clearly bogus, and that's why Buildroot complains.
> 
> > ################################################################################
> > #
> > # libonvif
> > ################################################################################
> > LIBONVIF_VERSION = 1.1.1
> > LIBONVIF_SOURCE = v$(LIBONVIF_VERSION).tar.gz
> > LIBONVIF_SITE = https://github.com/sr99622/libonvif/archive/refs/tags
> > LIBONVIF_INSTALL_STAGING = YES
> > LIBONVIF_INSTALL_TARGET = YES
> > LIBONVIF_CONF_OPTS = --with-libxml2 --includedir="$(STAGING_DIR)/usr/include/libxml2" 
> 
> This includedir is wrong, and is perhaps the reason for the failure.
> includedir is the location where libonvif will install its headers, not
> where the libxml2 headers will be found. And setting
> $(STAGING_DIR)/usr/include/libxml2 for includedir is incorrect, because
> then at install time we pass DESTDIR=$(TARGET_DIR) (for target
> installation) or DESTDIR=$(STAGING_DIR) (for staging installation).
> 
> This means that the libonvif headers will get installed in:
> 
>  $(TARGET_DIR)/$(STAGING_DIR)/usr/include/libxml2
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the value you passed to includedir
> 
> and
> 
>  $(STAGING_DIR)/$(STAGING_DIR)/usr/include/libxml2
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the value you passed to includedir
> 
> Hope this helps,
> 
> Thomas
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] I have a problem adding new package
  2022-02-04 10:22   ` Arek Marud
@ 2022-02-06 11:31     ` Arnout Vandecappelle
  2022-02-10  6:23       ` Arek Marud
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2022-02-06 11:31 UTC (permalink / raw)
  To: Arek Marud, buildroot

  Hi Arek,

  Please don't top-post, but reply inline like I do below.


On 04/02/2022 11:22, Arek Marud wrote:
> Helo Thomas,
> 
> Thank you for your answer.
> I had a problem with libonvif compilation. Compiler complaing about
> unsafe include path (details pasted below).
> 
> I was able to compile project ONLY when --includedir parameter was set,
> without it - compiler complains about include path.
> 
> https://gist.github.com/arekmd/11e9621ae3fc476cf37e80150d15b177
> 
> I pasted build log without LIBONVIF_CONF_OPTS line.
> 
> 
> myname buildroot$> make libonvif-build
> WARNING: no hash file for v1.1.1.tar.gz
>>>> libonvif 1.1.1 Extracting
[snip]
> make[3]: Entering directory '/home/myname/workbench/resources/development/myproj/bu
> ildroot/buildroot/output/build/libonvif-1.1.1/build'
> /bin/sh ../libtool  --tag=CC   --mode=compile /home/myname/workbench/resources/dev
> elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -
> DHAVE_CONFIG_H -I. -I..   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFS
> ET_BITS=64 -I/usr/include -I/usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  This is what is wrong.

  It is caused by the following lines in build/Makefile.am [1]

AM_CFLAGS = -I$(INCLUDE) -I$(INCLUDE)/libxml2 -I../source
...
INCLUDE = @includedir@
LIB = @libdir@

That is just simply wrong.

  The proper fix is to patch the project and

- Remove the -I stuff from AM_CFLAGS, instead just set AM_CFLAGS = -I../source
- Remove the INCLUDE and LIB assignments
- Do proper discovery of libxml2 in configure.ac
- Add the libxml2 include and lib directories to CFLAGS and LIBS either in 
configure.ac or in build/Makefile.am


  But it seems that this project is pretty dead, so the easier approach is to 
just add

LIBONVIF_MAKE_OPTS = \
	INCLUDE=$(STAGING_DIR)/usr/include \
	LIBS=$(STAGING_DIR)/usr/lib

  Regards,
  Arnout

[1] 
https://github.com/sr99622/libonvif/blob/76961fb9f3ece462724a4a6c09b4bd7cc051b759/build/Makefile.am#L7

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] I have a problem adding new package
  2022-02-06 11:31     ` Arnout Vandecappelle
@ 2022-02-10  6:23       ` Arek Marud
  0 siblings, 0 replies; 5+ messages in thread
From: Arek Marud @ 2022-02-10  6:23 UTC (permalink / raw)
  To: buildroot


Hi Arnout, 

>  Hi Arek,
> 
>  Please don't top-post, but reply inline like I do below.
> 
> On 04/02/2022 11:22, Arek Marud wrote:
> > Helo Thomas,
> > 
> > Thank you for your answer.
> > I had a problem with libonvif compilation. Compiler complaing about
> > unsafe include path (details pasted below).
> > 
> > I was able to compile project ONLY when --includedir parameter was set,
> > without it - compiler complains about include path.
> > 
> > https://gist.github.com/arekmd/11e9621ae3fc476cf37e80150d15b177
> > 
> > I pasted build log without LIBONVIF_CONF_OPTS line.
> > 
> > 
> > myname buildroot$> make libonvif-build
> > WARNING: no hash file for v1.1.1.tar.gz
> > > > > libonvif 1.1.1 Extracting
> [snip]
> > make[3]: Entering directory '/home/myname/workbench/resources/development/myproj/bu
> > ildroot/buildroot/output/build/libonvif-1.1.1/build'
> > /bin/sh ../libtool  --tag=CC   --mode=compile /home/myname/workbench/resources/dev
> > elopment/myproj/buildroot/buildroot/output/host/bin/aarch64-myproj-linux-gnu-gcc -
> > DHAVE_CONFIG_H -I. -I..   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFS
> > ET_BITS=64 -I/usr/include -I/usr/include/libxml2 -I../source -D_LARGEFILE_SOURCE
>                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
>  This is what is wrong.
> 
>  It is caused by the following lines in build/Makefile.am [1]
> 
> AM_CFLAGS = -I$(INCLUDE) -I$(INCLUDE)/libxml2 -I../source
> ...
> INCLUDE = @includedir@
> LIB = @libdir@
> 
> That is just simply wrong.
> 
>  The proper fix is to patch the project and
> 
> - Remove the -I stuff from AM_CFLAGS, instead just set AM_CFLAGS = -I../source
> - Remove the INCLUDE and LIB assignments
> - Do proper discovery of libxml2 in configure.ac
> - Add the libxml2 include and lib directories to CFLAGS and LIBS either in
> configure.ac or in build/Makefile.am
> 
> 
>  But it seems that this project is pretty dead, so the easier approach is to
> just add
> 
> LIBONVIF_MAKE_OPTS = \
> 	INCLUDE=$(STAGING_DIR)/usr/include \
> 	LIBS=$(STAGING_DIR)/usr/lib

That worked. Library successfully compile and install.

> 
>  Regards,
>  Arnout
> 
> [1] https://github.com/sr99622/libonvif/blob/76961fb9f3ece462724a4a6c09b4bd7cc051b759/build/Makefile.am#L7
> 

Thank your for your help.

-- 
Best regards,
Arek 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-10  6:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 22:09 [Buildroot] I have a problem adding new package Arek Marud
2022-01-30 22:48 ` Thomas Petazzoni via buildroot
2022-02-04 10:22   ` Arek Marud
2022-02-06 11:31     ` Arnout Vandecappelle
2022-02-10  6:23       ` Arek Marud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.