Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kinsella, Ray <ray.kinsella@intel.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/radlib: New package
Date: Wed, 20 Jan 2016 13:01:37 +0000	[thread overview]
Message-ID: <1453294897.2933.57.camel@intel.com> (raw)
In-Reply-To: <20160120134527.7b78d6a3@free-electrons.com>

Hi,

On Wed, 2016-01-20 at 13:45 +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 20 Jan 2016 11:57:17 +0000, Kinsella, Ray wrote:

> Just don't use your e-mail client to send patches, use "git
> send-email".

ok - I will look at this :-)

> 
> > > This remains completely wrong. Contrary to what you do in your
> > > .mk
> > > file, --prefix should *NOT* be $(STAGING_DIR)/usr or
> > > $(TARGET_DIR)/usr.
> > > It should be just "/usr". And therefore those -I$(prefix)/include
> > > and
> > > -L$(prefix)/lib are totally wrong.
> > 
> > Ok - but if I don't do this, it picks up the headers/libs for its
> > dependencies (libc, sqlite, mysql) from the host's /usr. I was
> > using
> > the prefix to keep these paths right.
> 
> Just remove -I$(prefix)/include everywhere from the Makefile.am of
> this
> package, it is bogus.

ok - thanks for the pointer.

> > 
> > > > +-if CROSSCOMPILE
> > > > +-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
> > > > $(prefix)/lib/crtn.o
> > > > +-endif
> > > > ++#if CROSSCOMPILE
> > > > ++#raddebug_LDFLAGS += $(prefix)/lib/crt1.o
> > > > $(prefix)/lib/crti.o
> > > > $(prefix)/lib/crtn.o
> > > > ++#endif
> > > 
> > > Why ?
> > 
> > Ok - I can ask why these wherever explicitly passed to linker in
> > the
> > first instance. If I don't remove them - the linker fails
> > complaining
> > of duplicate symbols. (the patch should just remove, rather than
> > comment these lines).  
> 
> Linking explicitly against crt1.o and crti.o seems wrong to me. gcc
> will automatically take care of linking against crt1.o/crti.o when
> needed.

Hence I commented them out - I will just remove them altogether via a
patch. 

> 
> > > > +diff -Naur a/debug/Makefile.in b/debug/Makefile.in
> > > > +--- a/debug/Makefile.in        2016-01-12 14:33:24.655252603
> > > > +0000
> > > > ++++ b/debug/Makefile.in        2016-01-12 14:34:05.062321796
> > > > +0000
> > > Same.
> > 
> > As above - but I will remove this altogether and let the reconf
> > take
> > care of making the Makefile.in. 
> 
> Absolutely. Changing both Makefile.am and Makefile.in doesn't make
> much
> sense.

Agreed,

> 
> > > > diff --git a/package/radlib/Config.in
> > > > b/package/radlib/Config.in
> > > > new file mode 100644
> > > > index 0000000..2ca1617
> > > > --- /dev/null
> > > > +++ b/package/radlib/Config.in
> > > > @@ -0,0 +1,22 @@
> > > > +config BR2_PACKAGE_RADLIB
> > > > +       bool "radlib"
> > > > +       select BR2_PACKAGE_SQLITE
> > > > +       select BR2_PACKAGE_SQLITE_NO_SYNC
> > > 
> > > Why do you force this NO_SYNC option ?
> > 
> > The sqlite db is staging area really - the data doesn't usually
> > hang
> > around on the embedded device - it is generally uploaded to the
> > cloud
> > etc. Might be more appropriate to trigger this wview instead of
> > radlib.
> 
> It is really up to the user to decide this.

Ok agreed.

> Remember that on the same system, sqlite can also be used for other
> purposes. So assuming that fsync() is not needed because *your*
> package
> doesn't need it is a wrong assumption. Maybe other applications using
> sqlite on the same system need to have fsync() enabled.

Understood - fair point. 

> > > Ditto. Also, if you select BR2_PACKAGE_MYSQL, you must replicate
> > > all
> > > the "depends on" of BR2_PACKAGE_MYSQL. I would therefore rather
> > > suggest
> > > you to remove this option, and simply enable MySQL support in the
> > > .mk
> > > file if BR2_PACKAGE_MYSQL=y.
> > 
> > ok this makes sense - but is less explicit.
> 
> Right, but it's "obvious" for the user: if you want MySQL support or
> SQLite support in a package, it is kind of obvious that you need to
> enable the MySQL / SQLite packages.
> 
> We normally only do sub-options for optional dependencies when it is
> not obvious which other packages need to be enabled in order to
> benefit
> for the optional dependency.
> 
> However, there are situations where this is not so clear-cut, so we
> don't have a very strict rule about this.

ok - I will rework as indicated. 


> > ok noted - that I shouldn't explicitly passing these, but it still
> > doesn't fix my paths for dependencies.
> 
> See above: remove all the -I$(prefix)/include and -L$(prefix)/lib
> from
> the Makefile.am.

Agreed.

> 
> Are you in contact with upstream ?

No - will send em a patch, once we are done here. 

> Thanks,
> 
> Thomas

Thanks for the feedback,

Ray K

      reply	other threads:[~2016-01-20 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 16:19 [Buildroot] [PATCH] package/radlib: New package Kinsella, Ray
2016-01-19 16:47 ` Thomas Petazzoni
2016-01-20 11:57   ` Kinsella, Ray
2016-01-20 12:45     ` Thomas Petazzoni
2016-01-20 13:01       ` Kinsella, Ray [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=1453294897.2933.57.camel@intel.com \
    --to=ray.kinsella@intel.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox