Hi all,
I don't know if it's the good section to post so excuse me by advance if it isn't the right section.
I'm running FreeBSD 8.1-p8 and I want to compile the software cgminer (there isn't a port for this software). Source is available at this address: http://ck.kolivas.org/apps/cgminer/. When I run
But when I run
This error refers to this line I think:
But if I use gmake this error disappears but I have the other
The line 3236 in usbutils.c:3236 is this code:
if I comment the block I have finally this error:
And finally it seems cgminer wants to link against libdl, which does not exist on FreeBSD I think. So if I delete this switch, I have this error:
But know at this point I don't have any idea how to solve the error
I think the code is not ready for FreeBSD but could you help me to compile it?
Thank you very much.
PS: I wrote to the author but I didn't have any box with FreeBSD to debug the software.
I don't know if it's the good section to post so excuse me by advance if it isn't the right section.
I'm running FreeBSD 8.1-p8 and I want to compile the software cgminer (there isn't a port for this software). Source is available at this address: http://ck.kolivas.org/apps/cgminer/. When I run
./configure --with-system-libusb --enable-icarus
, the output is ok:
Code:
------------------------------------------------------------------------
cgminer 3.8.4
------------------------------------------------------------------------
Configuration Options Summary:
libcurl(GBT+getwork).: Enabled: -L/usr/local/lib -lcurl
curses.TUI...........: FOUND: -lncurses
Avalon.ASICs.........: Disabled
BlackArrow.ASICs.....: Disabled
BFL.ASICs............: Disabled
BitForce.FPGAs.......: Disabled
BitFury.ASICs........: Disabled
Hashfast.ASICs.......: Disabled
Icarus.ASICs/FPGAs...: Enabled
Klondike.ASICs.......: Disabled
KnC.ASICs............: Disabled
ModMiner.FPGAs.......: Disabled
Compilation............: make (or gmake)
CPPFLAGS.............:
CFLAGS...............: -g -O2
LDFLAGS..............: -lpthread
LDADD................: -ldl -L/usr/local/lib -lcurl compat/jansson-2.5/src/.libs/libjansson.a -lpthread -lm -lusb -lrt
Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local
But when I run
make
I have this error:
Code:
make all-recursive
Making all in lib
GEN arg-nonnull.h
GEN c++defs.h
GEN warn-on-use.h
GEN signal.h
GEN string.h
make all-recursive
CC dummy.o
CC memmem.o
AR libgnu.a
Making all in compat
Making all in jansson-2.5
"Makefile", line 825: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1
Stop in /tmp/cgminer-3.8.4/compat.
*** Error code 1
Stop in /tmp/cgminer-3.8.4.
*** Error code 1
Stop in /tmp/cgminer-3.8.4.
This error refers to this line I think:
Code:
line 825 of compat/jansson-2.5
# These flags are gcc specific
export AM_CFLAGS = -Wall -Wextra -Wdeclaration-after-statement
But if I use gmake this error disappears but I have the other
Code:
usbutils.c:3236: error: redefinition of 'union semun'
gmake[2]: *** [cgminer-usbutils.o] Error 1
gmake[2]: Leaving directory `/tmp/cgminer-3.8.4'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/cgminer-3.8.4'
gmake: *** [all] Error 2
The line 3236 in usbutils.c:3236 is this code:
Code:
#ifndef __APPLE__
union semun {
int val;
struct semid_ds *buf;
unsigned short *array;
struct seminfo *__buf;
};
#endif
if I comment the block I have finally this error:
Code:
CCLD cgminer
/usr/bin/ld: cannot find -ldl
gmake[2]: *** [cgminer] Error 1
gmake[2]: Leaving directory `/tmp/cgminer-3.8.4'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/cgminer-3.8.4'
gmake: *** [all] Error 2
Code:
CCLD cgminer
cgminer-cgminer.o(.text+0x18b4): In function `libusb_poll_thread':
/tmp/cgminer-3.8.4/cgminer.c:7801: undefined reference to `libusb_handle_events_timeout_completed'
cgminer-cgminer.o(.text+0x18da):/tmp/cgminer-3.8.4/cgminer.c:7809: undefined reference to `libusb_handle_events_timeout_completed'
cgminer-util.o(.text+0x17bc): In function `nanosleep_abstime':
/tmp/cgminer-3.8.4/util.c:1001: undefined reference to `clock_nanosleep'
cgminer-usbutils.o(.text+0x1b37): In function `usb_all':
/tmp/cgminer-3.8.4/usbutils.c:999: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x1cc4):/tmp/cgminer-3.8.4/usbutils.c:903: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x1cf7):/tmp/cgminer-3.8.4/usbutils.c:899: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x1d6e):/tmp/cgminer-3.8.4/usbutils.c:979: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x6988): In function `resource_process':
/tmp/cgminer-3.8.4/usbutils.c:3546: undefined reference to `semtimedop'
cgminer-usbutils.o(.text+0x88f3): In function `_usb_transfer_read':
/tmp/cgminer-3.8.4/usbutils.c:2899: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x8cec): In function `__usb_transfer':
/tmp/cgminer-3.8.4/usbutils.c:2830: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0x9b74): In function `_usb_write':
/tmp/cgminer-3.8.4/usbutils.c:2732: undefined reference to `libusb_error_name'
cgminer-usbutils.o(.text+0xa181): In function `_usb_read':
/tmp/cgminer-3.8.4/usbutils.c:2641: undefined reference to `libusb_error_name'
gmake[2]: *** [cgminer] Error 1
gmake[2]: Leaving directory `/tmp/cgminer-3.8.4'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/cgminer-3.8.4'
gmake: *** [all] Error 2
I think the code is not ready for FreeBSD but could you help me to compile it?
Thank you very much.
PS: I wrote to the author but I didn't have any box with FreeBSD to debug the software.