Giter Site home page Giter Site logo

Comments (10)

driskell avatar driskell commented on July 23, 2024

Hi, thanks for the report!

Yes, gmake will be needed. I've tried to fix that "No rule to make target" error on this branch:
https://github.com/driskell/log-courier/tree/issues/1
If you're able to give it a try that will be great.

Also the output of the following will help me find something to test on:

make -v
gmake -v

Thanks,

Jason

from log-courier.

dsolsona avatar dsolsona commented on July 23, 2024

Using branch issues/1

Now I can build it using gmake.

# gmake
go get -d -tags "" log-courier
go install -tags "" log-courier

But trying with zmq throws the following error.

# gmake with=zmq
go get -d -tags " zmq zmq_4_x" log-courier
go install -tags " zmq zmq_4_x" log-courier
# github.com/alecthomas/gozmq
cc did not produce error at completed:1
on input:
#line 20 "/home/daniel/log-courier/src/github.com/alecthomas/gozmq/zmq.go"


#include <zmq.h>
#include <stdlib.h>
#include <string.h>


#include <sys/types.h> /* for size_t below */

/* Define intgo when compiling with GCC.  */
#ifdef __PTRDIFF_TYPE__
typedef __PTRDIFF_TYPE__ intgo;
#elif defined(_LP64)
typedef long long intgo;
#else
typedef int intgo;
#endif

typedef struct { char *p; intgo n; } _GoString_;
typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
_GoBytes_ GoBytes(void *p, int n);
char *CString(_GoString_);
void *_CMalloc(size_t);
#line 1 "not-declared"
void __cgo_f_1_1(void) { __typeof__(EFSM) *__cgo_undefined__; }
#line 1 "not-type"
void __cgo_f_1_2(void) { EFSM *__cgo_undefined__; }
#line 1 "not-const"
void __cgo_f_1_3(void) { enum { __cgo__undefined__ = (EFSM)*1 }; }
#line 2 "not-declared"
void __cgo_f_2_1(void) { __typeof__(zmq_strerror) *__cgo_undefined__; }
#line 2 "not-type"
void __cgo_f_2_2(void) { zmq_strerror *__cgo_undefined__; }
#line 2 "not-const"
void __cgo_f_2_3(void) { enum { __cgo__undefined__ = (zmq_strerror)*1 }; }
#line 3 "not-declared"
void __cgo_f_3_1(void) { __typeof__(zmq_bind) *__cgo_undefined__; }
#line 3 "not-type"
void __cgo_f_3_2(void) { zmq_bind *__cgo_undefined__; }
#line 3 "not-const"
void __cgo_f_3_3(void) { enum { __cgo__undefined__ = (zmq_bind)*1 }; }
#line 4 "not-declared"
void __cgo_f_4_1(void) { __typeof__(short) *__cgo_undefined__; }
#line 4 "not-type"
void __cgo_f_4_2(void) { short *__cgo_undefined__; }
#line 4 "not-const"
void __cgo_f_4_3(void) { enum { __cgo__undefined__ = (short)*1 }; }
#line 5 "not-declared"
void __cgo_f_5_1(void) { __typeof__(zmq_init) *__cgo_undefined__; }
#line 5 "not-type"
void __cgo_f_5_2(void) { zmq_init *__cgo_undefined__; }
#line 5 "not-const"
void __cgo_f_5_3(void) { enum { __cgo__undefined__ = (zmq_init)*1 }; }
#line 6 "not-declared"
void __cgo_f_6_1(void) { __typeof__(zmq_connect) *__cgo_undefined__; }
#line 6 "not-type"
void __cgo_f_6_2(void) { zmq_connect *__cgo_undefined__; }
#line 6 "not-const"
void __cgo_f_6_3(void) { enum { __cgo__undefined__ = (zmq_connect)*1 }; }
#line 7 "not-declared"
void __cgo_f_7_1(void) { __typeof__(EMTHREAD) *__cgo_undefined__; }
#line 7 "not-type"
void __cgo_f_7_2(void) { EMTHREAD *__cgo_undefined__; }
#line 7 "not-const"
void __cgo_f_7_3(void) { enum { __cgo__undefined__ = (EMTHREAD)*1 }; }
#line 8 "not-declared"
void __cgo_f_8_1(void) { __typeof__(size_t) *__cgo_undefined__; }
#line 8 "not-type"
void __cgo_f_8_2(void) { size_t *__cgo_undefined__; }
#line 8 "not-const"
void __cgo_f_8_3(void) { enum { __cgo__undefined__ = (size_t)*1 }; }
#line 9 "not-declared"
void __cgo_f_9_1(void) { __typeof__(CString) *__cgo_undefined__; }
#line 9 "not-type"
void __cgo_f_9_2(void) { CString *__cgo_undefined__; }
#line 9 "not-const"
void __cgo_f_9_3(void) { enum { __cgo__undefined__ = (CString)*1 }; }
#line 10 "not-declared"
void __cgo_f_10_1(void) { __typeof__(ENOCOMPATPROTO) *__cgo_undefined__; }
#line 10 "not-type"
void __cgo_f_10_2(void) { ENOCOMPATPROTO *__cgo_undefined__; }
#line 10 "not-const"
void __cgo_f_10_3(void) { enum { __cgo__undefined__ = (ENOCOMPATPROTO)*1 }; }
#line 11 "not-declared"
void __cgo_f_11_1(void) { __typeof__(zmq_socket) *__cgo_undefined__; }
#line 11 "not-type"
void __cgo_f_11_2(void) { zmq_socket *__cgo_undefined__; }
#line 11 "not-const"
void __cgo_f_11_3(void) { enum { __cgo__undefined__ = (zmq_socket)*1 }; }
#line 12 "not-declared"
void __cgo_f_12_1(void) { __typeof__(zmq_setsockopt) *__cgo_undefined__; }
#line 12 "not-type"
void __cgo_f_12_2(void) { zmq_setsockopt *__cgo_undefined__; }
#line 12 "not-const"
void __cgo_f_12_3(void) { enum { __cgo__undefined__ = (zmq_setsockopt)*1 }; }
#line 13 "not-declared"
void __cgo_f_13_1(void) { __typeof__(int) *__cgo_undefined__; }
#line 13 "not-type"
void __cgo_f_13_2(void) { int *__cgo_undefined__; }
#line 13 "not-const"
void __cgo_f_13_3(void) { enum { __cgo__undefined__ = (int)*1 }; }
#line 14 "not-declared"
void __cgo_f_14_1(void) { __typeof__(free) *__cgo_undefined__; }
#line 14 "not-type"
void __cgo_f_14_2(void) { free *__cgo_undefined__; }
#line 14 "not-const"
void __cgo_f_14_3(void) { enum { __cgo__undefined__ = (free)*1 }; }
#line 15 "not-declared"
void __cgo_f_15_1(void) { __typeof__(long) *__cgo_undefined__; }
#line 15 "not-type"
void __cgo_f_15_2(void) { long *__cgo_undefined__; }
#line 15 "not-const"
void __cgo_f_15_3(void) { enum { __cgo__undefined__ = (long)*1 }; }
#line 16 "not-declared"
void __cgo_f_16_1(void) { __typeof__(zmq_getsockopt) *__cgo_undefined__; }
#line 16 "not-type"
void __cgo_f_16_2(void) { zmq_getsockopt *__cgo_undefined__; }
#line 16 "not-const"
void __cgo_f_16_3(void) { enum { __cgo__undefined__ = (zmq_getsockopt)*1 }; }
#line 17 "not-declared"
void __cgo_f_17_1(void) { __typeof__(zmq_pollitem_t) *__cgo_undefined__; }
#line 17 "not-type"
void __cgo_f_17_2(void) { zmq_pollitem_t *__cgo_undefined__; }
#line 17 "not-const"
void __cgo_f_17_3(void) { enum { __cgo__undefined__ = (zmq_pollitem_t)*1 }; }
#line 18 "not-declared"
void __cgo_f_18_1(void) { __typeof__(zmq_poll) *__cgo_undefined__; }
#line 18 "not-type"
void __cgo_f_18_2(void) { zmq_poll *__cgo_undefined__; }
#line 18 "not-const"
void __cgo_f_18_3(void) { enum { __cgo__undefined__ = (zmq_poll)*1 }; }
#line 19 "not-declared"
void __cgo_f_19_1(void) { __typeof__(ETERM) *__cgo_undefined__; }
#line 19 "not-type"
void __cgo_f_19_2(void) { ETERM *__cgo_undefined__; }
#line 19 "not-const"
void __cgo_f_19_3(void) { enum { __cgo__undefined__ = (ETERM)*1 }; }
#line 20 "not-declared"
void __cgo_f_20_1(void) { __typeof__(GoString) *__cgo_undefined__; }
#line 20 "not-type"
void __cgo_f_20_2(void) { GoString *__cgo_undefined__; }
#line 20 "not-const"
void __cgo_f_20_3(void) { enum { __cgo__undefined__ = (GoString)*1 }; }
#line 21 "not-declared"
void __cgo_f_21_1(void) { __typeof__(zmq_term) *__cgo_undefined__; }
#line 21 "not-type"
void __cgo_f_21_2(void) { zmq_term *__cgo_undefined__; }
#line 21 "not-const"
void __cgo_f_21_3(void) { enum { __cgo__undefined__ = (zmq_term)*1 }; }
#line 22 "not-declared"
void __cgo_f_22_1(void) { __typeof__(zmq_device) *__cgo_undefined__; }
#line 22 "not-type"
void __cgo_f_22_2(void) { zmq_device *__cgo_undefined__; }
#line 22 "not-const"
void __cgo_f_22_3(void) { enum { __cgo__undefined__ = (zmq_device)*1 }; }
#line 23 "not-declared"
void __cgo_f_23_1(void) { __typeof__(zmq_version) *__cgo_undefined__; }
#line 23 "not-type"
void __cgo_f_23_2(void) { zmq_version *__cgo_undefined__; }
#line 23 "not-const"
void __cgo_f_23_3(void) { enum { __cgo__undefined__ = (zmq_version)*1 }; }
#line 24 "not-declared"
void __cgo_f_24_1(void) { __typeof__(zmq_close) *__cgo_undefined__; }
#line 24 "not-type"
void __cgo_f_24_2(void) { zmq_close *__cgo_undefined__; }
#line 24 "not-const"
void __cgo_f_24_3(void) { enum { __cgo__undefined__ = (zmq_close)*1 }; }
#line 1 "completed"
int __cgo__1 = __cgo__2;

gmake: *** [bin/log-courier] Error 2

from log-courier.

dsolsona avatar dsolsona commented on July 23, 2024

I'm using:
GNU Make 3.82
10.0-RELEASE-p1 FreeBSD amd64

And libzmq4
Name : libzmq4
Version : 4.0.4_1
Origin : net/libzmq4
Architecture : freebsd:10:x86:64

from log-courier.

driskell avatar driskell commented on July 23, 2024

Thanks.

Can you run "go env" (I think that's it) and give the output?
It should tell us what compiler it is using under CC=

Seems the Go works out but with Zmq it needs cgo to compile C code from zmq and there's where it's hitting a problem at moment.

Jason

from log-courier.

dsolsona avatar dsolsona commented on July 23, 2024

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64"
TERM="dumb"
CC="cc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"

from log-courier.

driskell avatar driskell commented on July 23, 2024

It looks like the problem is related to Go compiler on FreeBSD and the linker.

Did you download the binaries from golang.org and use those, or did you download the source and build it yourself? One suggestion I can find is in the downloaded binaries, rebuild by running "all.bash" in the src folder.

When I get a moment I will try get a FreeBSD 10 VM running so I can a bit more background on this.

Thanks!

from log-courier.

dsolsona avatar dsolsona commented on July 23, 2024

I used the port lang/go which basically does

do-build:
        cd ${WRKSRC}/src && \
                CC=${CC} \
                GOROOT=${WRKSRC} GOROOT_FINAL=${PREFIX}/go \
                GOBIN= GOARCH=${GOARCH} GOOS=${OPSYS:tl} \
                ${SH} make.bash

And if I'm right, cc should be clang.

 # cc -v
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix

from log-courier.

driskell avatar driskell commented on July 23, 2024

@dsolsona Unfortunately I'm short on time so may not get to this for a while. It's not popped up on any other platform, so it could just be a Golang compiler thing that may get fixed by them in a future Golang version such as 1.3.1 or 1.4.

I'll close this for now - if there begins to be a larger demand to get things working on FreeBSD 10 I will try to find some time, but for now it's looking like I won't. Thanks for reporting though.

from log-courier.

hxw avatar hxw commented on July 23, 2024

I found tihs while searching for the same error on pebbe/zmq4

look to me like clang limits errors to some small number by default so the final error is not seen.

I was able to get the zmq4 to compile on FreeBSD10 by adding:

#cgo freebsd CFLAGS: -ferror-limit=9999 -Wno-attributes

perhaps this might help this case.

Seems that above is not necessary if export CC=clang is done

from log-courier.

trombonehero avatar trombonehero commented on July 23, 2024

This is related to golang/go#10453: cgo sets -ferror-limit=0 when it knows that it's using Clang, but on FreeBSD it doesn't understand that /usr/bin/cc is Clang.

from log-courier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.