Bug 146321

Summary: [patch] misc/ossp-uuid headers conflicts with system
Product: Ports & Packages Reporter: Anders F Björklund <afb>
Component: Individual Port(s)Assignee: Vasil Dimov <vd>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Anders F Björklund 2010-05-05 08:20:01 UTC
ossp-uuid-1.6.2_1 breaks libSM-1.1.1_1 build

sm_genid.c: In function 'SmsGenerateClientID':
sm_genid.c:92: error: storage size of 'uuid' isn't known
sm_genid.c:95: error: too many arguments to function 'uuid_create'
sm_genid.c:97: warning: implicit declaration of function 'uuid_to_string'
sm_genid.c:97: warning: nested extern declaration of 'uuid_to_string'
sm_genid.c:99: warning: passing argument 1 of 'strlen' from incompatible pointer type
sm_genid.c:102: warning: passing argument 2 of 'strcpy' from incompatible pointer type
sm_genid.c:92: warning: unused variable 'uuid'


i.e. it's getting the wrong file with #include <uuid.h>

/usr/local/include/uuid.h versus /usr/include/uuid.h

Fix: Suggestion is to move the ossp-uuid headers to a "ossp" subdirectory.

Pkg-config will have library users pick this change up automatically.



Patch attached with submission follows:
How-To-Repeat: 
install misc/ossp-uuid, build x11/libSM
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-05-05 08:20:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vd

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Vasil Dimov freebsd_committer freebsd_triage 2010-06-02 09:10:36 UTC
Responsible Changed
From-To: vd->x11

Hello, 

Here is an equivalent but simpler than the submitted patch for 
misc/ossp-uuid: 

--- cut --- 
Index: Makefile 
=================================================================== 
RCS file: /home/pcvs/ports/misc/ossp-uuid/Makefile,v 
retrieving revision 1.34 
diff -u -r1.34 Makefile 
--- Makefile	29 Jul 2009 07:34:44 -0000	1.34 
+++ Makefile	2 Jun 2010 08:09:15 -0000 
@@ -7,7 +7,7 @@ 

PORTNAME=	uuid 
PORTVERSION=	1.6.2 
-PORTREVISION=	1 
+PORTREVISION=	2 
CATEGORIES=	misc devel 
MASTER_SITES=	${MASTER_SITE_OSSP} 
MASTER_SITE_SUBDIR=	lib/${PORTNAME} 
@@ -20,7 +20,8 @@ 

GNU_CONFIGURE=	yes 
USE_LDCONFIG=	yes 
-CONFIGURE_ARGS=	--disable-shared --enable-static --with-cxx 
+CONFIGURE_ARGS=	--disable-shared --enable-static --with-cxx  
+		--includedir=${PREFIX}/include/ossp 

MAN1=	uuid-config.1 uuid.1 
MAN3=	uuid.3 uuid++.3 
Index: pkg-plist 
=================================================================== 
RCS file: /home/pcvs/ports/misc/ossp-uuid/pkg-plist,v 
retrieving revision 1.5 
diff -u -r1.5 pkg-plist 
--- pkg-plist	12 Dec 2007 15:06:11 -0000	1.5 
+++ pkg-plist	2 Jun 2010 08:09:15 -0000 
@@ -1,7 +1,7 @@ 
bin/uuid 
bin/uuid-config 
-include/uuid.h 
-include/uuid++.hh 
+include/ossp/uuid.h 
+include/ossp/uuid++.hh 
lib/libuuid.a 
lib/libuuid++.a 
lib/libuuid++.la 
--- cut --- 

but I believe the problem is in x11/libSM itself. If it does include 
-I/usr/include before -I/usr/local/include then it will pick the right 
uuid.h. 

Assigning to the x11/libSM maintainer. 

Thanks!
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2010-06-03 02:52:34 UTC
Responsible Changed
From-To: x11->freebsd-x11

Canonicalize assignment.
Comment 4 c.kworr 2012-01-30 15:56:14 UTC
Hi there.

I see the progress has gone nowhere... I'll try to resurrect this one.

First of all, libSM doesn't pick those values itself, it inherits them 
from `pkg-config --cflags "ice >= 1.0.5 xproto"`.

The proposal for adding /usr/include before /usr/local/include is wrong 
too. Try building a port with:

CONFIGURE_ARGS+=--disable-docs --without-xmlto
CONFIGURE_ENV+= SM_CFLAGS="-I/usr/include -I${PREFIX}/include" 
XTRANS_CFLAGS="-I/usr/include -I${PREFIX}/include"

Even when you set:

CONFIGURE_ARGS+=--disable-docs --without-xmlto --includedir=/usr/include
CONFIGURE_ENV+= SM_CFLAGS="-I/usr/include" XTRANS_CFLAGS="-I/usr/include"

it wouldn't build either because of missing includes in $prefix/include, 
but if you would add that dir it will surely pickup incorrect header.

You can check used configuration in 
$wrkdirprefix/usr/ports/x11/libSM/work/libSM-1.2.0/Makefile

-- 
Sphinx of black quartz judge my vow.
Comment 5 Daniel Gerzo freebsd_committer freebsd_triage 2012-05-08 12:24:02 UTC
Responsible Changed
From-To: freebsd-x11->vd

- restore the original synopsis and pass back to vd@ 

I have hit this bug as well. After a brief research it turns out that 
fixing this in libSM itself is not the right thing to do (see the 
previous followup and these comments:) 

12:55:25 <@jilles> conflicting files in /usr/local/include considered 
harmful 
13:11:26 <@jilles> DanGer, I think working around it in x11/libSM is 
rather fragile 
13:11:34 <@kwm> jilles: I agree 
13:12:45 <@DanGer> jilles: the submitter proposes to fix it in 
ossp-uuid 
13:13:15 <@jilles> DanGer, yes, and I think that's the right thing to 
do 
13:21:48 <@DanGer> jilles: may I assign the bug to vd and include your 
comments? 
13:23:25 <@kwm> DanGer: go ahead (with my x11 hat) 
13:23:54 <@jilles> DanGer, go ahead 

Hopefully, this will get resolved after 2 years.
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-06-10 19:10:21 UTC
vd          2012-06-10 18:10:08 UTC

  FreeBSD ports repository

  Modified files:
    misc/ossp-uuid       Makefile pkg-plist 
  Added files:
    misc/ossp-uuid/files patch-uuid.pc.in 
  Log:
  Install misc/ossp-uuid header files into PREFIX/include/ossp instead
  of PREFIX/include because they conflict with system /usr/include/uuid.h
  
  PR:             ports/146321
  
  Revision  Changes    Path
  1.35      +3 -2      ports/misc/ossp-uuid/Makefile
  1.1       +11 -0     ports/misc/ossp-uuid/files/patch-uuid.pc.in (new)
  1.6       +3 -2      ports/misc/ossp-uuid/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Vasil Dimov freebsd_committer freebsd_triage 2012-06-11 09:18:05 UTC
State Changed
From-To: open->closed

Fixed after N years :-(