# error by emerging bluez-utils

## meulie

Hi everyone!

I get the following error while trying to emerge bluez-utils 2.7:

```

Making all in tools

make[2]: Entering directory `/var/tmp/portage/bluez-utils-2.7/work/bluez-utils-2.7/tools'

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c hcitool.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c l2ping.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c sdptool.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c ciptool.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c ppporc.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c hcisecfilter.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c hciattach.c

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c hciconfig.c

sdptool.c: In function `add_handsfree':

sdptool.c:1129: error: `HANDSFREE_SVCLASS_ID' undeclared (first use in this function)

sdptool.c:1129: error: (Each undeclared identifier is reported only once

sdptool.c:1129: error: for each function it appears in.)

sdptool.c:1135: error: `HANDSFREE_PROFILE_ID' undeclared (first use in this function)

sdptool.c:1151: error: `SDP_SUPPORTED_FEATURES' undeclared (first use in this function)

sdptool.c: At top level:

sdptool.c:1578: error: `HANDSFREE_SVCLASS_ID' undeclared here (not in a function)

sdptool.c:1578: error: initializer element is not constant

sdptool.c:1578: error: (near initialization for `service[7].class')

sdptool.c:1578: error: initializer element is not constant

sdptool.c:1578: error: (near initialization for `service[7]')

sdptool.c:1580: error: initializer element is not constant

sdptool.c:1580: error: (near initialization for `service[8]')

sdptool.c:1581: error: initializer element is not constant

sdptool.c:1581: error: (near initialization for `service[9]')

sdptool.c:1583: error: initializer element is not constant

sdptool.c:1583: error: (near initialization for `service[10]')

sdptool.c:1584: error: initializer element is not constant

sdptool.c:1584: error: (near initialization for `service[11]')

sdptool.c:1585: error: initializer element is not constant

sdptool.c:1585: error: (near initialization for `service[12]')

sdptool.c:1587: error: initializer element is not constant

sdptool.c:1587: error: (near initialization for `service[13]')

gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -g -O2 -c csr.c

make[2]: *** [sdptool.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: Leaving directory `/var/tmp/portage/bluez-utils-2.7/work/bluez-utils-2.7/tools'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/bluez-utils-2.7/work/bluez-utils-2.7'

make: *** [all-recursive-am] Error 2

 

!!! ERROR: net-wireless/bluez-utils-2.7 failed.

!!! Function src_compile, Line 50, Exitcode 2

!!! (no error message)

```

Does anyone know how do fix this...?

----------

## thesnowman

Are you using distcc, or performing parallel makes?  If so, have you tried emerging with it turned off?

Not much help I know, but it's all I could think of.

----------

## meulie

Nope serial make and no distcc in use...    :Confused: 

----------

## thesnowman

Which bluetooth kernel patch do you have applied?  I've got 2.6.6-mh2 and bluez-utils-2.7 emerges fine.

----------

## meulie

I'm using kernel 2.6.7rc3 with the builtin bluetooth support...

----------

## thesnowman

I'm assuming you've successfully emerged bluez-libs-2.7, which should have un-merged bluez-sdp.

Can you find the missing reference in sdp.h?  e.g.

```
bash-2.05b# cat /usr/include/bluetooth/sdp.h | grep HANDSFREE_SVCLASS_ID

#define HANDSFREE_SVCLASS_ID            0x111e

```

If that header file doesn't exist or that line is not there, then I think you may have the wrong version of bluez-libs installed.

----------

## meulie

 *thesnowman wrote:*   

> I'm assuming you've successfully emerged bluez-libs-2.7, which should have un-merged bluez-sdp.
> 
> 

 

My system has both bluez-libs-2.7 & bluez-sdp-1.5 installed. Should I begin with un-emerging bluez-sdp?    :Cool: 

UPDATE: done that, and then bluez-utils emerged without any problems...   :Smile: 

----------

## thesnowman

 *Quote:*   

> UPDATE: done that, and then bluez-utils emerged without any problems... 

 

Excellent!

With the introduction of bluez-libs & utils 2.6 bluez-sdp is no longer required as it was incorporated into the core library.  Since 2.7 bluez-pan is no longer required either, for the same reason.  Check out http://www.bluez.org/news.html for more info.

----------

## meulie

Aarrgghh... I just emerged bluez-pan...      :Rolling Eyes: 

I'll un-emerge it and do some RTFM before continuing...    :Cool: 

----------

## Shanachie

I've got a similar error with bluez-libs-2.10 and bluez-utils-2.10-r1. The build failes on the includes.

Has else anyone had this problem?

----------

## bjortolf

Yes, I've got hte same problem.  bluez-libs-2.10 emerged successfully, but bluez-utils-2.10-r1 fails. Anyone got any ideas?

----------

## bjortolf

 *bjortolf wrote:*   

> Yes, I've got hte same problem.  bluez-libs-2.10 emerged successfully, but bluez-utils-2.10-r1 fails. Anyone got any ideas?

 

hmmm. Now I unmerged bluez-libs (I was sure I tried this before  :Wink: ) and then a 'emerge bluez-utils'. And they both emerged beautifully. And sending and recieving files works like a charm.   :Very Happy: 

----------

## Swoosh

 *Quote:*   

> hmmm. Now I unmerged bluez-libs (I was sure I tried this before ) and then a 'emerge bluez-utils'. And they both emerged beautifully. And sending and recieving files works like a charm.  

 

Solved the problem for me too.   :Very Happy: 

----------

## kozmic

Short summary:

As reported, unemerging bluez-utils and bluez-libs first, will solve the compile errors.

----------

