mattn / go-gtk

Go binding for GTK
http://mattn.github.com/go-gtk
BSD 3-Clause "New" or "Revised" License
2.11k stars 247 forks source link

Problem installing on Windows 64-bit #288

Open pbrown12303 opened 7 years ago

pbrown12303 commented 7 years ago

I have go-gtk in my GoWorkspace (C:/GoWorkspace) as recommended by the golang community. I have installed msys64 in C:/Software/msys64 and have within it the underlying gtk+ libraries. I have set PKG_CONFIG_PATH to C:/Software/msys64/mingw64/lib/pkgconfig When I go to build go-gtk I get:

**** Building Go project: go-gtk **** with GOPATH: C:\GoWorkspace\

Running: C:\Software\Go\bin\go.exe install -v -gcflags "-N -l" github.com/mattn/go-gtk/... github.com/mattn/go-gtk/pango github.com/mattn/go-gtk/glib

pkg-config --cflags glib-2.0 gobject-2.0

error $PKG_CONFIG_PATH: malformed keyword line: "glib_genmarshal=glib-genmarshal" error : no library found in $GOPATH: glib-2.0 error $GOPATH: no library found in $GOPATH: glib-2.0 error github.com: PKG_CONDIF_GITHUB not exported, skipping github.com lookup pkg-config: exit status 1

github.com/mattn/go-gtk/pango

In file included from github.com\mattn\go-gtk\pango\pango.go:5:0: ./pango.go.h:7:25: fatal error: pango/pango.h: No such file or directory compilation terminated. ^^^ Terminated, exit code: 2 ^^^ **** Build terminated. ****

It seems that pkg-config is having a problem parsing the glib-2.0.pc file, but I don't know what to do about it.

mattn commented 7 years ago

please set PKG_CONFIG_PATH to the path correctly where the directory have gtk+-2.0.pc

pbrown12303 commented 7 years ago

I have PKG_CONFIG_PATH set to C:/Software/msys64/mingw64/lib/pkgconfig and have verified that the sought .pc files are actually there. I get different error messages if I do not have this path set.

I played a bit with the .pc file just to try and understand. There are three environment variables defined in glib-2.0.pc. Whichever one I put first gets the error: error $PKG_CONFIG_PATH: malformed keyword line: "glib_genmarshal=glib-genmarshal"

mattn commented 7 years ago

At the first, you should fix output of pkg-config

error $PKG_CONFIG_PATH: malformed keyword line: "glib_genmarshal=glib-genmarshal"
error : no library found in $GOPATH: glib-2.0
error $GOPATH: no library found in $GOPATH: glib-2.0
error github.com: PKG_CONDIF_GITHUB not exported, skipping github.com lookup
pkg-config: exit status 1

But I don't know what you should do.

pbrown12303 commented 7 years ago

I fixed up my path a bit - I had two different toolchains mixed together. Now I get:

**** Building Go project: go-gtk **** with GOPATH: C:\GoWorkspace\

Running: C:\Software\Go\bin\go.exe install -v -gcflags "-N -l" github.com/mattn/go-gtk/... github.com/mattn/go-gtk/pango github.com/mattn/go-gtk/glib

github.com/mattn/go-gtk/pango

In file included from github.com\mattn\go-gtk\pango\pango.go:5:0: ./pango.go.h:7:25: fatal error: pango/pango.h: No such file or directory

include <pango/pango.h>

^ compilation terminated.

github.com/mattn/go-gtk/glib

In file included from github.com\mattn\go-gtk\glib\glib.go:5:0: ./glib.go.h:4:18: fatal error: glib.h: No such file or directory

include

^ compilation terminated. ^^^ Terminated, exit code: 2 ^^^ **** Build terminated. ****

mattn commented 7 years ago

Seems to be still not fixed for pkg-config --cflags pango-1.0

pbrown12303 commented 7 years ago

As far as I can tell, pkg-config is executing properly (see below under pkg-config execution verification). When I execute the build with the -n option, the next line to be executed in the build after the calls to pkg-config is:

CGO_LDFLAGS="-g" "-O2" "C:\\Software\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "$WORK\\github.com\\mattn\\go-gtk\\glib\\_obj\\" -importpath github.com/mattn/go-gtk/glib -- -I "$WORK\\github.com\\mattn\\go-gtk\\glib\\_obj\\" glib.go

First, the CGO_LDFLAGS entry seems wrong: it seems to me that it should be CGO_LDFLAGS="-g -O2"

After setting this environment variable, when I execute the remainder of the line, I get:

$ "C:\\Software\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "$WORK\\github.com\\mattn\\go-gtk\\glib\\_obj\\" -importpath github.com/mattn/go-gtk/glib -- -I "$WORK\\github.com\\mattn\\go-gtk\\glib\\_obj\\" glib.go
In file included from C:\GoWorkspace\src\github.com\mattn\go-gtk\glib\glib.go:5:0:
./glib.go.h:4:18: fatal error: glib.h: No such file or directory
 #include <glib.h>
                  ^
compilation terminated.

Nowhere in this line do I see any indication of where the glib.h file should be found. Clearly there is something I do not understand about the interaction between pkg-config and the execution of cgo.exe. Can you explain how cgo is supposed to know about the location of these include files?

------------------------- pkg-config execution verification --------------------------------------------

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/glib
$ echo $PKG_CONFIG_PATH
/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/glib
$ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:C:\\msys64\\mingw64\\lib\\pkgconfig

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/glib
$ pkg-config --cflags glib-2.0 gobject-2.0
-mms-bitfields -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/glib
$ pkg-config --libs glib-2.0 gobject-2.0
-L/mingw64/lib -LC:/Software/msys64/mingw64/lib/../lib -L/mingw64/lib -LC:/Software/msys64/mingw64/lib -L/mingw64/lib -lgobject-2.0 -lffi -lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/pango
$ pkg-config --cflags pango
-mms-bitfields -I/mingw64/include/pango-1.0 -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include

pbrown@PBROWN-W550S MSYS /c/GoWorkspace/src/github.com/mattn/go-gtk/pango
$ pkg-config --libs pango
-L/mingw64/lib -LC:/Software/msys64/mingw64/lib/../lib -L/mingw64/lib -LC:/Software/msys64/mingw64/lib -L/mingw64/lib -lpango-1.0 -lm -lgobject-2.0 -lffi -lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre
mattn commented 7 years ago

AFAICS, some paths are missing maybe. Did you update by hand?

pztrn commented 7 years ago

You should not do anything by hand with MSYS2, everything automated pretty well. Just make sure that you're installing dependencies in MINGW console, not MSYS2, and package names use MINGW prefix. See https://github.com/pztrn/urtrator/blob/master/doc/installation/windows/make-dist.sh#L37 for example of package names you should install.

For easy-of-use I made shell file which I'm sourcing on every MINGW console launch:

$ cat ~/go-env.sh
#!/bin/bash

#export PATH="${PATH}:/c/Go/bin/"
export PATH="${PATH}:${HOME}/go-git/bin/"
export GOROOT="${HOME}/go-git"
#export GOROOT="/c/Go/"
export GOPATH="${HOME}/GOPATH"

Note, that I'm using go devel now, so GOROOT and GOPATH pointing to custom locations. Default for binary Go distribution value of GOROOT is commented out.

pbrown12303 commented 7 years ago

Thank you @pztrn - I was able to modify your scripts to build all of go-gtk, with one exception: I cannot seem to find the mingw-w64 package that contains gtkgl-2.0! Any idea where I can get my hands on this?

pztrn commented 7 years ago

Probably these packages contains what you need:

$ pacman -Ss gtkgl
mingw32/mingw-w64-i686-gtkglext 1.2.0-2
    opengl extensions for gtk2 (mingw-w64)
mingw64/mingw-w64-x86_64-gtkglext 1.2.0-2
    opengl extensions for gtk2 (mingw-w64)
pbrown12303 commented 7 years ago

That's what I thought, but this package does not contain gtkgl-2.0. Any other ideas? I hate to have to build it from scratch (I am really not familiar with building the mingw-w64 stuff from source).

pztrn commented 7 years ago

Actually, no idea then. And rebuilding GTK is easy here - just read archlinux guides about PKGBUILDs, fix MINGW's one, rebuild and install :)

pbrown12303 commented 7 years ago

Sorry I did not get back sooner @pztrn - the pacman did the trick.

pbrown12303 commented 7 years ago

OK, rebuilding on a new machine and still have the same issue. In fact, I am not really sure why it worked on the other machine at all (I tried so many things). I have looked a little deeper and the problem is that the gtkglarea (version 2) is missing. PACMAN -Ss gtkglarea returns nothing. I downloaded the source but I am having trouble building and installing the package. It seems to be set up for a Gnu toolchain and I am working under msys64/mingw64 which apparently has a different toolchain. I am not familiar with either of these toolchains. Can you direct me to either a) a place I can download the gtkglarea package already built for Windows 64-bit or b) directions for building under msys64/mingw64?

mattn commented 7 years ago

I have not maintained gtkglarea for a while. Perhaps a problem may raise.

mattn commented 7 years ago

But I can confirm with gtkglext provide gtkglarea with prcman -S mingw-w64-x86_64-gtkglext at least.

pbrown12303 commented 7 years ago

I seem to be getting closer with a couple of changes.

In gtkglarea.go I changed:

// #cgo pkg-config: gtkgl-2.0

to

// #cgo pkg-config: gtkglext-1.0

in gtkgl.go.h I changed:

include <gtkgl/gdkgl.h>

include <gtkgl/gtkglarea.h>

to

include <gdk/gdkgl.h>

include <gtk/gtkglarea.h>

Now the only problem is in finding gtkglarea.h:

**** Building Go project: go-gtk **** with GOPATH: C:\GoWorkspace\

Running: C:\Go\bin\go.exe install -v -x -gcflags "-N -l" github.com/mattn/go-gtk/... WORK=C:\Users\pbrow\AppData\Local\Temp\go-build055098454 github.com/mattn/go-gtk/gtkgl mkdir -p $WORK\github.com\mattn\go-gtk\gtkgl_obj\ mkdir -p $WORK\github.com\mattn\go-gtk\ cd C:\GoWorkspace\src\github.com\mattn\go-gtk\gtkgl pkg-config --cflags gtkglext-1.0 pkg-config --libs gtkglext-1.0 CGO_LDFLAGS="-g" "-O2" "-LC:/msys64/mingw64/lib" "-lgtkglext-win32-1.0" "-lgdkglext-win32-1.0" "-lglu32" "-lopengl32" "-lgdi32" "-luser32" "-lkernel32" "-lgdk-win32-2.0" "-lgdi32" "-limm32" "-lshell32" "-lole32" "-Wl,-luuid" "-lgmodule-2.0" "-pthread" "-lgtk-win32-2.0" "-lgdk-win32-2.0" "-lgdi32" "-limm32" "-lshell32" "-lole32" "-Wl,-luuid" "-lpangowin32-1.0" "-lpangocairo-1.0" "-lpango-1.0" "-latk-1.0" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lintl" "C:\Go\pkg\tool\windows_amd64\cgo.exe" -objdir "C:\Users\pbrow\AppData\Local\Temp\go-build055098454\github.com\mattn\go-gtk\gtkgl\_obj\" -importpath github.com/mattn/go-gtk/gtkgl -- -pthread -mms-bitfields -pthread -mms-bitfields -IC:/msys64/mingw64/include/gtkglext-1.0 -IC:/msys64/mingw64/lib/gtkglext-1.0/include -IC:/msys64/mingw64/include/gtk-2.0 -IC:/msys64/mingw64/lib/gtk-2.0/include -IC:/msys64/mingw64/include/gtk-2.0 -IC:/msys64/mingw64/lib/gtk-2.0/include -IC:/msys64/mingw64/include/pango-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/atk-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/pixman-1 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -I "C:\Users\pbrow\AppData\Local\Temp\go-build055098454\github.com\mattn\go-gtk\gtkgl\_obj\" -g -O2 gtkglarea.go

github.com/mattn/go-gtk/gtkgl

In file included from github.com\mattn\go-gtk\gtkgl\gtkglarea.go:5:0: ./gtkgl.go.h:5:27: fatal error: gtk/gtkglarea.h: No such file or directory

include <gtk/gtkglarea.h>

^ compilation terminated. ^^^ Terminated, exit code: 2 ^^^ **** Build terminated. ****

On my system, the only copy of this file is in gtk-3.0, not gtk-2.0

-- PCB


Paul C. Brown

Paul C. Brown Consulting LLC - Specializing in IT Architecture and Strategy

"Total architecture is not a choice - it is a concession to reality."

Email: pbrow pbrown@tibco.comn12303@gmail.com Mobile: 518-424-5360

Architecture Books:

-- Succeeding With SOA: Realizing Business Value Through Total Architecture http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Implementing SOA: Total Architecture In Practice http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- TIBCO Architecture Fundamentals http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Composite Applications and Services with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Complex-Event Processing Solutions with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

The SOA Manifesto: soa-manifesto.or http://soa-manifesto.org/g


On Mon, Jul 10, 2017 at 8:07 PM, mattn notifications@github.com wrote:

But I can confirm with gtkglext provide gtkglarea with prcman -S mingw-w64-x86_64-gtkglext at least.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/288#issuecomment-314284596, or mute the thread https://github.com/notifications/unsubscribe-auth/ARw4jHIVN3ewwh0CMmPmB3P5ReGmW8uYks5sMrzSgaJpZM4K253I .

genbtc commented 7 years ago

Darn, i was hoping for a solution to this. the only thing ive found is to download https://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.0/ and make it yourself. It actually builds easily, just do a:

./configure
make
make install

To Re-utter the Question: Where can we get these functions normally provided by "gtkglarea.h" from the package @ gtkglarea-2.0.1 Why is it not a part of MSYS ??? Why is it outdated and what should we be using instead and does it require an architectural rewrite ?

undefined reference to `GTK_GL_AREA'
undefined reference to `gdk_gl_query'
undefined reference to `gtk_gl_area_make_current'
undefined reference to `gtk_gl_area_swapbuffers'
undefined reference to `gtk_gl_area_new'
pbrown12303 commented 7 years ago

OK. I'm gong to have to build it myself. I've downloaded the 2.0.1 version dated 7/18/2009, but I have some questions about the build. I have a top-level msys64 folder with mingw64 (and mingw32) under it.

  1. Where should I put the source code in this structure?
  2. Will the default settings get the binaries where they need to be?
  3. What do I need to do to get the pkgconfig file built properly?

-- PCB


Paul C. Brown

Paul C. Brown Consulting LLC - Specializing in IT Architecture and Strategy

"Total architecture is not a choice - it is a concession to reality."

Email: pbrow pbrown@tibco.comn12303@gmail.com Mobile: 518-424-5360

Architecture Books:

-- Succeeding With SOA: Realizing Business Value Through Total Architecture http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Implementing SOA: Total Architecture In Practice http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- TIBCO Architecture Fundamentals http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Composite Applications and Services with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Complex-Event Processing Solutions with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

The SOA Manifesto: soa-manifesto.or http://soa-manifesto.org/g


On Mon, Jul 17, 2017 at 9:03 PM, genBTC notifications@github.com wrote:

Darn, i was hoping for a solution to this. the only thing ive found is to download https://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.0/ and make it yourself. It actually builds well. I can explain how if you need to. To Re-utter the Question: Where can we get these functions normally provided by "gtkglarea.h" from the package @ gtkglarea-2.0.1 http://www.mono-project.com/archived/gtkglarea/ Why is it not a part of MSYS ??? Why is it outdated and what should we be using instead and does it require an architectural rewrite ?

undefined reference to GTK_GL_AREA' undefined reference togdk_gl_query' undefined reference to gtk_gl_area_make_current' undefined reference togtk_gl_area_swapbuffers' undefined reference to `gtk_gl_area_new'

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/288#issuecomment-315928014, or mute the thread https://github.com/notifications/unsubscribe-auth/ARw4jMUBhjy7OcczVYi7JJAWvjVKfYdBks5sPARrgaJpZM4K253I .

genbtc commented 7 years ago

Pbrown12303:
To simplify your life: According to your comments you are on 64 bit, MingW64 . Open the mingw64.exe shell. C:\msys64\mingw64.exe This gets you access to a special linux based shell and command prompt.

wget https://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.0/gtkglarea-2.0.1.tar.gz
tar -zxvf gtkglarea-2.0.1.tar.gz
cd gtkglarea-2.0.1/

This simply just downloads it and extract its to the home directory. Then these 3 commands will run 3 scripts that will set everything up.

./configure
make
make install

Response to your questions:

  1. The source code will end up getting installed into a "gtkgl-2.0" directory in \msys64\mingw64\include\
  2. The binaries (libgtkgl-2.0-1.dll) will be in \msys64\mingw64\bin\ The static Libs (libgtkgl-2.0.la, libgtkgl-2.0.dll.a, libgtkgl-2.0.a) end up getting installed in /lib
  3. Do not further concern yourself with the pkgconfig file. Editing it further is not relevant to your needs. This is internal to MSYS and ends up being automatically configured by 'make install' Modifying this could be why the other computer acted differently.

This is the beauty of the MSYS2 system. You gain access to it via a shell command that simulates (to a layman) to be an entire linux machine an entire filesystem (/include /bin /lib /etc) and ability to run ./configure (autoconf) and make (automake) scripts. Normally this would have been done by Pacman through a file provided by MSYS, but alas it has not been. This why you had to set all this up yourself, though its simple due to the ./configure, make, and make install scripts working so nicely in MSYS out of the box.

Therefore from Windows, you will have access to : C:\msys64\mingw64\include\ C:\msys64\mingw64\lib\ So point your compiler there. And for your includes:

#include <gtkgl/gdkgl.h>
#include <gtkgl/gtkglarea.h>

(pay particular attention to the T's and the D's)

pbrown12303 commented 7 years ago

Thank you for the quick response! Almost there. during make I got:

Warning: linker path does not have real file for library -lgdi32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libgdi32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libgdi32.a

Warning: linker path does not have real file for library -limm32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libimm32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libimm32.a

Warning: linker path does not have real file for library -lshell32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libshell32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libshell32.a

Warning: linker path does not have real file for library -lole32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libole32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libole32.a

Warning: linker path does not have real file for library -lglu32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libglu32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libglu32.a

Warning: linker path does not have real file for library -lopengl32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libopengl32 and none of the candidates passed a file format test using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib//libopengl32.a The inter-library dependencies that have been dropped here will be automatically added whenever a program is linked with this library or is declared to -dlopen it.

Since this library must not contain undefined symbols, because either the platform does not support them or it was explicitly requested with -no-undefined, libtool will only create a static version of it.

Then, during make install, I got:

/usr/bin/install -c .libs/libgtkgl-2.0.dll.a /mingw64/lib /usr/bin/install: cannot stat '.libs/libgtkgl-2.0.dll.a': No such file or directory make[2]: [Makefile:518: install-libtool-import-lib] Error 1 make[2]: Leaving directory '/home/pbrow/gtkglarea-2.0.1/gtkgl' make[1]: [Makefile:420: install-am] Error 2 make[1]: Leaving directory '/home/pbrow/gtkglarea-2.0.1/gtkgl' make: *** [Makefile:307: install-recursive] Error 1

The missing libraries are all present on my machine in C:\msys64\mingw64\x86_64-w64-mingw32\lib. I am leery of tinkering with the make files - can you tell me specifically what change to make so that these libraries are found? Is it an environment variable?

-- PCB


Paul C. Brown

Paul C. Brown Consulting LLC - Specializing in IT Architecture and Strategy

"Total architecture is not a choice - it is a concession to reality."

Email: pbrow pbrown@tibco.comn12303@gmail.com Mobile: 518-424-5360

Architecture Books:

-- Succeeding With SOA: Realizing Business Value Through Total Architecture http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Implementing SOA: Total Architecture In Practice http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- TIBCO Architecture Fundamentals http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Composite Applications and Services with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Complex-Event Processing Solutions with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713-432d-4e63-a5b1-3a9ee6fedbeb

The SOA Manifesto: soa-manifesto.or http://soa-manifesto.org/g


On Fri, Sep 22, 2017 at 6:09 AM, genBTC notifications@github.com wrote:

Pbrown12303: To simplify your life: According to your comments you are on 64 bit, MingW64 . Open the mingw64.exe shell. This gets you access prompt.

wget https://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.0/gtkglarea-2.0.1.tar.gz tar -zxvf gtkglarea-2.0.1.tar.gz cd gtkglarea-2.0.1/ ./configure make make install

Response to your questions:

  1. The source code will end up getting installed into a "gtkgl-2.0" directory in \msys64\mingw64\include\
  2. The binaries (libgtkgl-2.0-1.dll) will be in \msys64\mingw64\bin The static Libs (libgtkgl-2.0.la, libgtkgl-2.0.dll.a, libgtkgl-2.0.a) end up getting installed in /lib
  3. The pkgconfig file is not relevant to your needs. This is for the MSYS maintainers to handle, which still needs to be done by someone in charge.

This is the beauty of the MSYS2 system. You gain access to it via a shell command that simulates (to a layman) to be an entire linux machine with not only an entire filesystem (/include /bin /lib /etc) but ability to run ./configure (autoconf) and make (automake) scripts. This is what you are doing here to set all this up.

Therefore from Windows, you will have access to : C:\msys64\mingw64\include C:\msys64\mingw64\lib So point your compiler there.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/288#issuecomment-331407650, or mute the thread https://github.com/notifications/unsubscribe-auth/ARw4jHLSsSzE6mwT4caqygX9muYEt80Gks5sk4dkgaJpZM4K253I .

genbtc commented 7 years ago

Right - dont tinker with the make files. Unfortunately Im at a loss. All i can say is theres a 32 bit / 64 bit mismatch somewhere. It seems to be some kind of issue finding and using the 32 bit versions of some VERY core libraries (gdi32 shell32 ole32 imm32 are all part of Windows and therefore should have been provided). And you have them but they are 32 bit or something. So i dont really know what else to do, it works for me on MingW32.exe If you wanna try the MingW32.exe version of MSYS and try to get it working in there . Not sure why the 64 bit isnt finding the basic stuff though. You sure you set up the right version? It comes with both but the 64 bit comes as mostly blank. Try to start with downloading a new 64-bit MSYS2 and set up all the pre-requisites using pacman -S. (Note there is some command to re-install new MSYS system binaries from pacman but i forgot it)

On Fri, Sep 22, 2017 at 12:46 PM, Paul C Brown notifications@github.com wrote:

Thank you for the quick response! Almost there. during make I got:

Warning: linker path does not have real file for library -lgdi32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libgdi32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libgdi32.a

Warning: linker path does not have real file for library -limm32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libimm32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libimm32.a

Warning: linker path does not have real file for library -lshell32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libshell32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libshell32.a

Warning: linker path does not have real file for library -lole32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libole32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libole32.a

Warning: linker path does not have real file for library -lglu32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libglu32 and none of the candidates passed a file format test *** using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libglu32.a

Warning: linker path does not have real file for library -lopengl32. I have the capability to make that library automatically link in when you link to this library. But I can only do this if you have a shared version of the library, which you do not appear to have because I did check the linker path looking for a file starting with libopengl32 and none of the candidates passed a file format test using a file magic. Last file checked: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/. ./../../../x86_64-w64-mingw32/lib//libopengl32.a The inter-library dependencies that have been dropped here will be automatically added whenever a program is linked with this library or is declared to -dlopen it.

Since this library must not contain undefined symbols, because either the platform does not support them or it was explicitly requested with -no-undefined, libtool will only create a static version of it.

Then, during make install, I got:

/usr/bin/install -c .libs/libgtkgl-2.0.dll.a /mingw64/lib /usr/bin/install: cannot stat '.libs/libgtkgl-2.0.dll.a': No such file or directory make[2]: [Makefile:518: install-libtool-import-lib] Error 1 make[2]: Leaving directory '/home/pbrow/gtkglarea-2.0.1/gtkgl' make[1]: [Makefile:420: install-am] Error 2 make[1]: Leaving directory '/home/pbrow/gtkglarea-2.0.1/gtkgl' make: *** [Makefile:307: install-recursive] Error 1

The missing libraries are all present on my machine in C:\msys64\mingw64\x86_64-w64-mingw32\lib. I am leery of tinkering with the make files - can you tell me specifically what change to make so that these libraries are found? Is it an environment variable?

-- PCB


Paul C. Brown

Paul C. Brown Consulting LLC - Specializing in IT Architecture and Strategy

"Total architecture is not a choice - it is a concession to reality."

Email: pbrow pbrown@tibco.comn12303@gmail.com Mobile: 518-424-5360

Architecture Books:

-- Succeeding With SOA: Realizing Business Value Through Total Architecture http://www.informit.com/authors/bio.aspx?a=53cdb713- 432d-4e63-a5b1-3a9ee6fedbeb

-- Implementing SOA: Total Architecture In Practice http://www.informit.com/authors/bio.aspx?a=53cdb713- 432d-4e63-a5b1-3a9ee6fedbeb

-- TIBCO Architecture Fundamentals http://www.informit.com/authors/bio.aspx?a=53cdb713- 432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Composite Applications and Services with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713- 432d-4e63-a5b1-3a9ee6fedbeb

-- Architecting Complex-Event Processing Solutions with TIBCO http://www.informit.com/authors/bio.aspx?a=53cdb713- 432d-4e63-a5b1-3a9ee6fedbeb

The SOA Manifesto: soa-manifesto.or http://soa-manifesto.org/g


On Fri, Sep 22, 2017 at 6:09 AM, genBTC notifications@github.com wrote:

Pbrown12303: To simplify your life: According to your comments you are on 64 bit, MingW64 . Open the mingw64.exe shell. This gets you access prompt.

wget https://ftp.gnome.org/pub/GNOME/sources/gtkglarea/2.0/ gtkglarea-2.0.1.tar.gz tar -zxvf gtkglarea-2.0.1.tar.gz cd gtkglarea-2.0.1/ ./configure make make install

Response to your questions:

  1. The source code will end up getting installed into a "gtkgl-2.0" directory in \msys64\mingw64\include\
  2. The binaries (libgtkgl-2.0-1.dll) will be in \msys64\mingw64\bin The static Libs (libgtkgl-2.0.la, libgtkgl-2.0.dll.a, libgtkgl-2.0.a) end up getting installed in /lib
  3. The pkgconfig file is not relevant to your needs. This is for the MSYS maintainers to handle, which still needs to be done by someone in charge.

This is the beauty of the MSYS2 system. You gain access to it via a shell command that simulates (to a layman) to be an entire linux machine with not only an entire filesystem (/include /bin /lib /etc) but ability to run ./configure (autoconf) and make (automake) scripts. This is what you are doing here to set all this up.

Therefore from Windows, you will have access to : C:\msys64\mingw64\include C:\msys64\mingw64\lib So point your compiler there.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/288#issuecomment-331407650, or mute the thread https://github.com/notifications/unsubscribe-auth/ ARw4jHLSsSzE6mwT4caqygX9muYEt80Gks5sk4dkgaJpZM4K253I

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/288#issuecomment-331499654, or mute the thread https://github.com/notifications/unsubscribe-auth/ADg1oFUwFRygzDJyV4UAKxN4gjU84gRcks5sk-RmgaJpZM4K253I .