On Mit, 2008-07-09 at 18:04 +0200, Holger Levsen wrote:
[...]
> On Tuesday 08 July 2008 20:38, Bernd Petrovitsch wrote:
[...]
> > What you need and we want is a PREFIX (similar to the autotools).
> > Yes, I remember a patch from the BSD folks.
> 
> Is that patch in or lost?

That is in but it touched only in the BSD part.
I sent one on top of it (with a typoed subject) at 2008-05-25 which put
PREFIX everywhere.
But it defaults afterwards to "/usr/local" (and not "/usr") so I
consider it too intrusive in -rc*.

[...]
> > Can't you just do `make build_all LIBDIR=/usr/lib/olsrd` and
> > `make install_all DESTDIR=/some/where LIBDIR=/some/where/usr/lib/olsrd`
> > or a similar ugly hack?
> 
> it works, but then lintian told me: "E: olsrd-plugins: shlib-with-non-pic-code 
> usr/lib/olsrd/olsrd_httpinfo.so.0.1" which has this as an extended 
> description:
> 
> "The listed shared libraries contain object code that was compiled 
> without -fPIC. All object code in shared libraries should be recompiled 

Adding "-fPIC" globally for Linux (and only for plugins and IA64,Alpha
and HPPA) shouldn't hurt IMHO (and I personally don't care about a few
wasted CPU cycles just from the -fPIC). Non-Linux seem to have it
always.

Hmm, I can't remember if and why it is that complicated (and I'm too
lazy to google for it).

> separately from the static libraries with the -fPIC option. 
> Another common mistake that causes this problem is linking with 
> gcc -Wl,-shared instead of gcc -shared. 

Where are we doing that?

Hmm, we have "LDFLAGS += -shared" and that is used with "gcc", e.g.
----  snip  ----
/usr/bin/ccache gcc -shared -Wl,-soname,olsrd_nameservice -Wl,--version-script=version-script.txt  -Wl,--warn-common -fPIC -o olsrd_nameservice.so.0.3 src/compat.o src/mapwrite.o src/nameservice.o src/olsrd_plugin.o -lpthread 
----  snip  ----
Where is lintian's problem?


> (I actually used make build_all, make install and make install_libs, since I 
> want to install the plugins into a different debian binary package...)

Well, in am .spec file (for RPM), one (or at least /me) would `make
build_all` and `make install_all`, build the various rpms out of it (one
for the core and one each plugin or so so that people can install what
they need/want) and rm the unwanted rest -if there is any - to keep
`rpmbuld`s checking script silent.

[...]
> So for now, I'll resort to my patch to provide $pluginname and 
> $pluginname_install targets. Because the above also has the problem that some 
> unwanted plugins show up in the package. Of course I could rm them, but I 

The problem on upstream with "unwanted" is, that different downstream
people/distributions/packagers/.... have different opinions about what
is "unwanted" and about the reasons.
So the simple solution is: We installs all of them - if only to keep
them compiling;-) - and people can remove/package separately/patch the
Makefile to select if they wish.

> have a working solution atm, so why bother.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




