All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arek Marud <a.marud@post.pl>
To: buildroot@buildroot.org
Subject: Re: [Buildroot] I have a problem adding new package
Date: Thu, 10 Feb 2022 07:23:39 +0100	[thread overview]
Message-ID: <YgSva/uDdORQm9pE@leo> (raw)
In-Reply-To: <d33c9f1c-2a1c-285e-0acc-cd52db921a34@mind.be>


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

      reply	other threads:[~2022-02-10  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgSva/uDdORQm9pE@leo \
    --to=a.marud@post.pl \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.