Bug 71860 - openobex fails to build, cannot find includes
Summary: openobex fails to build, cannot find includes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-18 12:10 UTC by matthias.andree
Modified: 2004-10-11 23:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthias.andree 2004-09-18 12:10:28 UTC
Trying to build openobex fails:

===>  Building for openobex-1.0.1
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/comms/openobex/work/openobex-1.0.1'
Making all in m4macros
gmake[2]: Entering directory `/usr/ports/comms/openobex/work/openobex-1.0.1/m4macros'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/ports/comms/openobex/work/openobex-1.0.1/m4macros'
Making all in src
gmake[2]: Entering directory `/usr/ports/comms/openobex/work/openobex-1.0.1/src'
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I../src    -O2 -c obex.c
rm -f .libs/obex.lo
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -O2 -c obex.c  -fPIC -DPIC -o .libs/obex.lo
In file included from obex_main.h:60,
                 from obex.c:49:
obex_transport.h:46:33: bluetooth/bluetooth.h: No such file or directory
obex_transport.h:47:30: bluetooth/rfcomm.h: No such file or directory
In file included from obex_main.h:60,
                 from obex.c:49:
obex_transport.h:62: error: field `rfcomm' has incomplete type
...
gmake[2]: *** [obex.lo] Error 1
gmake[2]: Leaving directory `/usr/ports/comms/openobex/work/openobex-1.0.1/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/comms/openobex/work/openobex-1.0.1'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

Stop in /usr/ports/comms/openobex.

Config.log excerpt:

configure:7342: checking for IrDA support
configure:7369: cc -c -O2 -pipe -march=athlon-xp  conftest.c >&5
configure:7372: $? = 0
configure:7375: test -s conftest.o
configure:7378: $? = 0
configure:7388: result: yes
configure:7403: checking for Bluetooth support
configure:7432: cc -c -O2 -pipe -march=athlon-xp  conftest.c >&5
configure:7413:37: bluetooth/bluetooth.h: No such file or directory
configure:7414:34: bluetooth/rfcomm.h: No such file or directory
configure: In function `main':
configure:7424: error: syntax error before "bdaddr"
configure:7425: error: storage size of 'addr' isn't known
configure:7435: $? = 1
configure: failed program was:
#line 7411 "configure"
#include "confdefs.h"
#include <sys/socket.h>
                                #include <bluetooth/bluetooth.h>
                                #include <bluetooth/rfcomm.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
bdaddr_t bdaddr;
                 struct sockaddr_rc addr;
  ;
  return 0;
}
configure:7451: result: no
configure:7466: checking for the FreeBSD/netgraph bluetooth support
configure:7469: checking for bt_aton in -lbluetooth
configure:7502: cc -o conftest -O2 -pipe -march=athlon-xp   conftest.c -lbluetoo
th   >&5
configure:7505: $? = 0
configure:7508: test -s conftest
configure:7511: $? = 0
configure:7522: result: yes
configure:7525: checking for the struct sockaddr_rfcomm in <netgraph/.../ng_btso
cket.h>
configure:7554: cc -c -O2 -pipe -march=athlon-xp  conftest.c >&5
configure:7557: $? = 0
configure:7560: test -s conftest.o
configure:7563: $? = 0
configure:7573: result: yes
configure:7733: creating ./config.status

...
## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "openobex"
#define VERSION "1.0.1"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define HAVE_IRDA 1
#define HAVE_BLUETOOTH 1
#define HAVE_BLUETOOTH_NETGRAPH 1
#define HAVE_BT_ATON 1

configure: exit 0

How-To-Repeat: cd /usr/ports/comms/openobex && make
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-09-18 13:06:46 UTC
State Changed
From-To: open->feedback

Somehow sometimes config.h.in is not regenerated correctly 
and we end up with FreeBSD un-aware config.h. Could be some 
race condition or timestamp problem because I see it here 
in about half of make clean&&make runs. 

Please try adding 

USE_AUTOHEADER_VER=	253 

line to port Makefile after USE_AUTOCONF_VER line and 
tell me if it helped? 


Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2004-09-18 13:06:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Look into.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2004-09-18 18:10:39 UTC
I looked into the problem. the following patch seems to solve the issue.

Just adding USE_AUTOHEADER_VER as suggested was not enough.

please test.

--- Makefile.old	Thu Jul 22 17:29:21 2004
+++ Makefile	Sat Sep 18 19:07:35 2004
@@ -15,8 +15,9 @@
 COMMENT=	Open source implementation of the OBEX protocol
 
 USE_AUTOCONF_VER=	253
+USE_AUTOHEADER_VER=	253
 WANT_AUTOMAKE_VER=	14
-WANT_LIBTOOL_VER=	15
+USE_LIBTOOL_VER=	15
 USE_GMAKE=		yes
 INSTALLS_SHLIB=		yes
 GNU_CONFIGURE=		yes

-- 
Guido Falsi <mad@madpilot.net>
Comment 4 matthias.andree 2004-09-19 18:55:49 UTC
The patch works for me, thank you for the quick fix!

-- 
Matthias Andree
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-10-11 23:30:49 UTC
State Changed
From-To: feedback->closed

Patch fixing this issue was committed, thank you for reporting!