Hi Nicholas, all Le 11/01/2015 00:46, Nicholas Marriott a écrit : > Hmm well I think it's nice if users can just download the tarball and run > configure and it works without having to point it at dependencies, something > which regularly confuses users. /usr/local is a common default location for > local builds, I've occasionally been tempted to add some others too. > > Still, I'm not sure there is any evidence having this particulatly helps > anybody, libevent and ncurses are part of base on OpenBSD, NetBSD uses > /usr/pkg, > GCC on Linux mostly searches /usr/local by default. I suspect the FreeBSD > compiler searches /usr/local by default as well, I'll have a look at some > point. > > In the meantime, if you add your own include directories, they should be > searched first no matter what tmux adds.
Searching for headers is the purpose of configure script, and if user use a custom/local path then let it define these in CFLAGS. This is what we do when tmux is cross-compiled in Buildroot. See an example here: http://pastebin.com/T6Ng5Bn8 Which dependencies of tmux are assumed to be in /usr/local ? Best regards, Romain Naour > > > -------- Original message -------- > From: Romain Naour > Date:10/01/2015 23:09 (GMT+00:00) > To: Nicholas Marriott > Cc: tmux-us...@lists.sf.net > Subject: Re: [PATCH] Makefile.am: remove unsafe headers path > > Hi Nicholas, > > Le 10/01/2015 18:16, Nicholas Marriott a écrit : >> Well, why is it unsafe? I'm not too concerned about crossbuilding TBH. Are >> you >> sure this isn't still needed on eg FreeBSD? > > Ok, let's me explain my use case. > > tmux has been packaged in Buildroot [1][2] (and probably Yoto too) and the > build > system use a cross-compiler to build the entire target system. > > Also all headers and libraries for the target are installed in a specific > directory called STAGING_DIR. So using a path like /usr/local/include can lead > to mixing headers from host and target (that may come from different > versions). > > That why all paths that point to a host location (starting with /usr/include, > /usr/local/include or /lib) is considered unsafe for cross-compilation. > > Recently, we added in Buildroot a tool to check if host headers or libraries > paths are used [3]. > > Regarding FreeBSD compatibility, I'm not sure (I'm not a FreeBSB user). > Probably yes, they still need /usr/local/include for native build. > > But I think, it's the user's responsibility to ensure that their compiler > searches for headers in the appropriate location, not the tmux's Makefile. > Especially when headers paths are passed on the command line. > > For example, on my Fedora host the /usr/local/include is an empty directory, > It's not needed to force to use this path in the CFLAGS even for a native > build. > > Or consider using pkg-config to search for headers and libraries (ncurses and > libevent). > > Best regards, > Romain Naour > > [1] http://buildroot.org/ > [2] http://git.buildroot.net/buildroot/tree/package/tmux > [3] http://lists.busybox.net/pipermail/buildroot/2014-December/114848.html >> >> -------- Original message -------- >> From: Romain Naour >> Date:10/01/2015 14:12 (GMT+00:00) >> To: nicholas.marri...@gmail.com >> Cc: tmux-us...@lists.sf.net >> Subject: Re: [PATCH] Makefile.am: remove unsafe headers path >> >> Hi, >> >> Le 29/12/2014 22:35, Romain Naour a écrit : >>> /usr/local/include is probably not needed and it's unsafe for >>> cross-compilation. >>> >>> Signed-off-by: Romain Naour <romain.na...@openwide.fr> >>> --- >>> Makefile.am | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/Makefile.am b/Makefile.am >>> index a9ad5b9..0109e5d 100644 >>> --- a/Makefile.am >>> +++ b/Makefile.am >>> @@ -38,12 +38,12 @@ else >>> CFLAGS += -O2 >>> endif >>> if IS_GCC4 >>> -CPPFLAGS += -iquote. -I/usr/local/include >>> +CPPFLAGS += -iquote. >>> if IS_DEBUG >>> CFLAGS += -Wno-pointer-sign >>> endif >>> else >>> -CPPFLAGS += -I. -I- -I/usr/local/include >>> +CPPFLAGS += -I. -I- >>> endif >>> endif >>> >>> >> >> Please, consider this patch for the next release. >> >> Thanks. >> >> Best regards, >> Romain Naour -- Romain Naour OPEN WIDE Ingénierie - Paris 23/25, rue Daviel| 75013 PARIS http://ingenierie.openwide.fr Le blog des technologies libres et embarquées : http://www.linuxembedded.fr ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. www.gigenet.com _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users