From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 06:49:29 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55D53669 for ; Wed, 18 Feb 2015 06:49:29 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20E3A7C4 for ; Wed, 18 Feb 2015 06:49:28 +0000 (UTC) Received: by iecrl12 with SMTP id rl12so44315077iec.2 for ; Tue, 17 Feb 2015 22:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KAegwq5BCwgvN5SITDmt/HYxMoF2RBpbEs5mEMG1LT8=; b=tLP+f2KW2RKO5c4ctKlh2YZV+beCDNaCMrtDfQN+TValatstDtoLFF09wNBCnTjWXu wEZcfLrhyuFpIe0r2uaSsDDxbDg7rYg+g2/yvC5r9PhaAOU/XC8n9zbKjIIxIlQwMN27 /CGvFq57idxZAafXpVMhpW4PA5vYtJDzFeyV61s+XIKuAJYOB1iW5Ykzj9+Wa6bjGQII rflEcwcpQn8nweO1/a+4nhNGSza/TQqPEUr5u2m6q49ciemCewTLs6mODh3NBZj5BT3r 0t1QY4J9aye6Nujf5JlkjJhbDN73fwoUFVEn7Q+P+8UIF+bpaEVXiLnVM3NV/YOS0vgW lPsA== MIME-Version: 1.0 X-Received: by 10.50.62.110 with SMTP id x14mr1194125igr.2.1424242167722; Tue, 17 Feb 2015 22:49:27 -0800 (PST) Received: by 10.36.120.9 with HTTP; Tue, 17 Feb 2015 22:49:27 -0800 (PST) Received: by 10.36.120.9 with HTTP; Tue, 17 Feb 2015 22:49:27 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Feb 2015 07:49:27 +0100 Message-ID: Subject: Re: Golang and GUI toolkits on FreeBSD From: Malcolm Matalka To: "Sam Fourman Jr." Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 06:49:29 -0000 Have you installed gtk3 via ports or pkg? Den 18 feb 2015 07:30 skrev "Sam Fourman Jr." : > Hello list, > > I am trying to toy around with some sort of gui toolkit to build a X11 app > it turns out that I cant compile anything, not wx or gtk3 etc.. > > I am wondering if because clang is the default compiler on FreeBSD that is > causing me issues. > I would like to get to the bottom of how to fix this, so we can make a note > in the FreeBSD port so that others know. so please ask questions lets > figure out what is going on, it could be that I am missing something simple > (Eg, FreeBSD has everything in /usr/local ) > > > I really would appreciate any help at knowing how to fix this. > > > here is a example below of yet another toolkit that wont compile > when trying to build the sample code on this page: > > https://github.com/andlabs/ui/wiki/Getting-Started > > > I get this: > > go build gui.go > # github.com/andlabs/ui > cc did not produce error at completed:1 > on input: > #line 13 "/home/sfourman/go/src/github.com/andlabs/ui/area_unix.go" > #include "gtk_unix.h" > extern gboolean our_area_get_child_position_callback(GtkOverlay *, > GtkWidget *, GdkRectangle *, gpointer); > extern void our_area_textfield_populate_popup_callback(GtkEntry *, GtkMenu > *, gpointer); > extern gboolean our_area_textfield_focus_out_event_callback(GtkWidget *, > GdkEvent *, gpointer); > extern gboolean our_area_draw_callback(GtkWidget *, cairo_t *, gpointer); > extern gboolean our_area_button_press_event_callback(GtkWidget *, GdkEvent > *, gpointer); > extern gboolean our_area_button_release_event_callback(GtkWidget *, > GdkEvent *, gpointer); > extern gboolean our_area_motion_notify_event_callback(GtkWidget *, > GdkEvent *, gpointer); > extern gboolean our_area_enterleave_notify_event_callback(GtkWidget *, > GdkEvent *, gpointer); > extern gboolean our_area_key_press_event_callback(GtkWidget *, GdkEvent *, > gpointer); > extern gboolean our_area_key_release_event_callback(GtkWidget *, GdkEvent > *, gpointer); > /* because cgo doesn't like ... */ > static inline void gtkGetDoubleClickSettings(GtkSettings *settings, gint > *maxTime, gint *maxDistance) > { > g_object_get(settings, > "gtk-double-click-time", maxTime, > "gtk-double-click-distance", maxDistance, > NULL); > } > > > #include /* for ptrdiff_t and size_t below */ > > /* Define intgo when compiling with GCC. */ > typedef ptrdiff_t intgo; > > 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__(CAIRO_FORMAT_ARGB32) > *__cgo_undefined__; } > #line 1 "not-type" > void __cgo_f_1_2(void) { CAIRO_FORMAT_ARGB32 *__cgo_undefined__; } > #line 1 "not-const" > void __cgo_f_1_3(void) { enum { __cgo__undefined__ = > (CAIRO_FORMAT_ARGB32)*1 }; } > #line 2 "not-declared" > void __cgo_f_2_1(void) { __typeof__(CAIRO_STATUS_SUCCESS) > *__cgo_undefined__; } > #line 2 "not-type" > void __cgo_f_2_2(void) { CAIRO_STATUS_SUCCESS *__cgo_undefined__; } > #line 2 "not-const" > void __cgo_f_2_3(void) { enum { __cgo__undefined__ = > (CAIRO_STATUS_SUCCESS)*1 }; } > #line 3 "not-declared" > void __cgo_f_3_1(void) { __typeof__(FALSE) *__cgo_undefined__; } > #line 3 "not-type" > void __cgo_f_3_2(void) { FALSE *__cgo_undefined__; } > #line 3 "not-const" > void __cgo_f_3_3(void) { enum { __cgo__undefined__ = (FALSE)*1 }; } > #line 4 "not-declared" > void __cgo_f_4_1(void) { __typeof__(GCallback) *__cgo_undefined__; } > #line 4 "not-type" > void __cgo_f_4_2(void) { GCallback *__cgo_undefined__; } > > > followed by a bunch more errors that I dont think are relevant. > > below is my config: > > sfourman@Sam ~/go/freebsd % go version > go version go1.4.1 freebsd/amd64 > > > sfourman@Sam ~/go/freebsd % go env > GOARCH="amd64" > GOBIN="" > GOCHAR="6" > GOEXE="" > GOHOSTARCH="amd64" > GOHOSTOS="freebsd" > GOOS="freebsd" > GOPATH="/home/sfourman/go" > GORACE="" > GOROOT="/usr/local/go" > GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_amd64" > CC="cc" > GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" > CXX="g++" > CGO_ENABLED="1" > > sfourman@Sam ~/go/freebsd % cc -v > FreeBSD clang version 3.5.1 (tags/RELEASE_351/final 225668) 20150115 > Target: x86_64-unknown-freebsd11.0 > Thread model: posix > sfourman@Sam ~/go/freebsd % > > uname -a > FreeBSD Sam 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r277531: Thu Jan 22 > 11:47:53 CST 2015 sfourman@Sam:/usr/obj/usr/src/sys/GENERIC amd64 > > -- > > Sam Fourman Jr. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >