ShareOpenSolaris


Home » OpenSolaris.com Forums » Packaging

Thread: Make Error when building from source


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Pages: 1 - Last Post: Apr 2, 2009 6:45 AM Last Post By: SnowFlax Threads: [ Previous | Next ]
KS_78

Posts: 15
Registered: 5/22/08
Make Error when building from source
Posted: Jul 10, 2008 10:33 PM
 
  Click to reply to this thread Reply
I'm trying to build Network UPS Tools (http://www.networkupstools.org/) from source, but 'make' gives me an error. Any ideas on how to fix this?

Thanks in advance.


admin@obsidian:~/Desktop/nut-2.2.2# make
Making all in include
      • Error code 127
The following command caused the error:
SVNREV=`LANG=C svnversion -n .. 2>/dev/null`; \
if ; \
then NUT_VERSION="2.2.2"; \
else NUT_VERSION="2.2.2-$SVNREV"; \
fi ; \
echo '/* Autogenerated file. Do not change. */' > _nut_version.h ; \
echo '/* This file was generated by "make". */' >> _nut_version.h ; \
echo "#define NUT_VERSION_MACRO \"$NUT_VERSION\"" >> _nut_version.h ; \
echo "NUT_VERSION: \"$NUT_VERSION\""
make: Fatal error: Command failed for target `nut_version.h'
Current working directory /export/home/admin/Desktop/nut-2.2.2/include
      • Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
= | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='include common clients conf data docs drivers lib man packaging scripts server'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
admin@obsidian:~/Desktop/nut-2.2.2#
SnowFlax

Posts: 3
Registered: 3/30/09
Re: Make Error when building from source
Posted: Mar 30, 2009 2:24 PM   in response to: KS_78 in response to: KS_78
 
  Click to reply to this thread Reply
Is there anyone who got a solution to the problem?
Mephistopheles

Posts: 126
Registered: 2/5/09
Re: Make Error when building from source
Posted: Mar 30, 2009 5:46 PM   in response to: KS_78 in response to: KS_78
 
  Click to reply to this thread Reply
The first thing I would generally check when running a makefile in Solaris, is whether you are calling the expected version of make. Many source code bundles expect GNU make (and gcc), which do not install with OpenSolaris by default, and the build will fail with the Sun Studio tools.

Beyond that, was the code written for, or ported to, Solaris? Not all source code is cross-platform compatible. If so, are all dependencies present?
SnowFlax

Posts: 3
Registered: 3/30/09
Re: Make Error when building from source
Posted: Mar 31, 2009 7:21 AM   in response to: KS_78 in response to: KS_78
 
  Click to reply to this thread Reply
I made it (…) by installing ss-dev ("pkg install ss-dev")!

Now the problem is the communcation with the UPS.

When I plug in the UPS:

  1. dmesg
Mar 31 15:23:23 obelix usba: [ID 912658 kern.info] USB 0.20 device (usb592,2) operating at low speed (USB 1.x) on USB 1.10 root hub: device@1, usb_mid1 at bus address 2
Mar 31 15:23:23 obelix usba: [ID 349649 kern.info] Powerware UPS
Mar 31 15:23:23 obelix genunix: [ID 936769 kern.info] usb_mid1 is /pci@0,0/pci1043,82d4@1d/device@1
Mar 31 15:23:23 obelix genunix: [ID 408114 kern.info] /pci@0,0/pci1043,82d4@1d/device@1 (usb_mid1) online
Mar 31 15:23:23 obelix usba: [ID 349649 kern.info] usba: no driver found for interface 0 (nodename: 'interface') of Powerware UPS
Mar 31 15:23:23 obelix unix: [ID 954099 kern.info] NOTICE: IRQ16 is being shared by drivers with different interrupt levels.
Mar 31 15:23:23 obelix This may result in reduced system performance.

  1. ls -l /dev/usb/device0
lrwxrwxrwx 1 root root 54 2009-03-31 15:23 /dev/usb/device0 -> ../../devices/pci@0,0/pci1043,82d4@1d/device@1:usb_mid

  1. cat etc/ups.conf
[5110]
driver = bcmxcp_usb
port=/dev/usb/device0

  1. bin/bcmxcp_usb -DDDDDD -a 5110
Network UPS Tools - BCMXCP UPS driver 0.21 (2.4.1)
USB communication subdriver 0.17
send_to_all: SETINFO driver.parameter.port "/dev/usb/device0"
debug level is '6'
Can't open POWERWARE USB device, retrying ...
^CCan't open POWERWARE USB device
Unable to find POWERWARE UPS device on USB bus

Things to try:

- Connect UPS device to USB bus

- Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
See upsdrvctl(8) and ups.conf(5).

Fatal error: unusable configuration

Any idea about how to contact the UPS?

Regards Tobias
r.hartley

Posts: 23
Registered: 3/16/09
Re: Make Error when building from source
Posted: Mar 31, 2009 11:20 AM   in response to: KS_78 in response to: KS_78
 
  Click to reply to this thread Reply
If you didn't run configure first, check out the build options here:

http://www.networkupstools.org/doc/2.2.0/configure.html

RH
SnowFlax

Posts: 3
Registered: 3/30/09
Re: Make Error when building from source
Posted: Apr 2, 2009 6:45 AM   in response to: r.hartley in response to: r.hartley
 
  Click to reply to this thread Reply
Thanks, but I've already done that:
./configure
make
make install

The problem stil is…

Point your RSS reader here for a feed of the latest messages in all forums