build compiles same c code each time

333 views
Skip to first unread message

simon place

unread,
Sep 28, 2015, 9:26:19 PM9/28/15
to golang-nuts
compiles started taking much longer than i'd expect, and were variable, on this project sometimes 3-4 secs, sometimes 10, and then it seems to get stuck at about 30 secs, which gets old quickly.

now by using build -x option, i see its recompiling c code.

i'm importing, github.com/go-gl/glfw/v3.1/glfw, and github.com/go-gl/gl/v2.1/gl

sometime it recompiles one or other of these two packages, and i noticed that sometimes after a get (or a re-get) it doesn't recompile them for a while, but then, seemingly randomly, starts and the compile take longer and longer!

from build -x (when having 10 sec builds.) see below for much shorter log after a get, and having 3 sec builds.

WORK=/tmp/go-build188704401
mkdir -p $WORK/_/home/???/working/13/glwrap/_obj/
mkdir -p $WORK/_/home/???/working/13/
cd /home/???/working/13/glwrap
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/working/13/glwrap.a -trimpath $WORK -p _/home/???/working/13/glwrap -complete -buildid daf0a8b6b77d4bc483b6966f0a99f337241b5bdc -D _/home/???/working/13/glwrap -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./VBO.go ./program.go ./shaders.go ./texture.go
mkdir -p $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/
mkdir -p $WORK/github.com/go-gl/glfw/v3.1/
cd /home/simon/gocode/src/github.com/go-gl/glfw/v3.1/glfw
CGO_LDFLAGS="-g" "-O2" "-lGL" "-lX11" "-lXrandr" "-lXxf86vm" "-lXi" "-lXcursor" "-lm" "-lXinerama" /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -importpath github.com/go-gl/glfw/v3.1/glfw -- -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN build.go context.go error.go glfw.go input.go monitor.go native_linbsd.go time.go util.go window.go
mkdir -p $WORK/_/home/???/working/13/shapes/_obj/
cd /home/???/working/13/shapes
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/working/13/shapes.a -trimpath $WORK -p _/home/???/working/13/shapes -complete -buildid 8d2c7f85f123481c001d6c89af4ef50ba7b52749 -D _/home/???/working/13/shapes -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./advanced.go ./basic.go ./draw.go ./general.go ./listReaders.go ./load.go
cd /home/simon/gocode/src/github.com/go-gl/glfw/v3.1/glfw
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -print-libgcc-file-name
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_main.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_main.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_export.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_export.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/build.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/build.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/context.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/context.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/native_linbsd.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/native_linbsd.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/time.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/time.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/util.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/util.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.cgo2.o -c $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.o -c ./error.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_context.o -c ./glfw_context.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_egl_context.o -c ./glfw_egl_context.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_glx_context.o -c ./glfw_glx_context.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_init.o -c ./glfw_init.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_input.o -c ./glfw_input.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_linux_joystick.o -c ./glfw_linux_joystick.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_mach_time.o -c ./glfw_mach_time.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_monitor.o -c ./glfw_monitor.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_time.o -c ./glfw_posix_time.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_tls.o -c ./glfw_posix_tls.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wgl_context.o -c ./glfw_wgl_context.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_init.o -c ./glfw_win32_init.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_monitor.o -c ./glfw_win32_monitor.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_time.o -c ./glfw_win32_time.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_tls.o -c ./glfw_win32_tls.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_window.o -c ./glfw_win32_window.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_window.o -c ./glfw_window.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_winmm_joystick.o -c ./glfw_winmm_joystick.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_init.o -c ./glfw_wl_init.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_monitor.o -c ./glfw_wl_monitor.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_window.o -c ./glfw_wl_window.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_init.o -c ./glfw_x11_init.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_monitor.o -c ./glfw_x11_monitor.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_window.o -c ./glfw_x11_window.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_xkb_unicode.o -c ./glfw_xkb_unicode.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.o -c ./input.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.o -c ./monitor.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -g -O2 -D_GLFW_USE_OPENGL -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_GLXGETPROCADDRESSARB -D_GLFW_HAS_DLOPEN -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.o -c ./window.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_main.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_export.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/build.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/context.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/native_linbsd.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/time.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/util.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_egl_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_glx_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_input.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_linux_joystick.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_mach_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_tls.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wgl_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_tls.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_winmm_joystick.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_xkb_unicode.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.o -g -O2 -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama
/usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/ -dynpackage glfw -dynimport $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_.o -dynout $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_import.go
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_all.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_export.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/build.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/context.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/native_linbsd.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/time.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/util.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.cgo2.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_egl_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_glx_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_input.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_linux_joystick.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_mach_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_posix_tls.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wgl_context.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_time.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_tls.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_win32_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_winmm_joystick.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_wl_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_init.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_x11_window.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw_xkb_unicode.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.o $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.o -g -O2 -Wl,-r -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a -Wl,--build-id=none
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/github.com/go-gl/glfw/v3.1/glfw.a -trimpath $WORK -p github.com/go-gl/glfw/v3.1/glfw -buildid 5fd3626b1c26bbcf38043dd12fb5f30f315e6924 -D _/home/simon/gocode/src/github.com/go-gl/glfw/v3.1/glfw -I $WORK -pack $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_gotypes.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/build.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/context.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/error.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/glfw.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/input.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/monitor.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/native_linbsd.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/time.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/util.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/window.cgo1.go $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_cgo_import.go
pack r $WORK/github.com/go-gl/glfw/v3.1/glfw.a $WORK/github.com/go-gl/glfw/v3.1/glfw/_obj/_all.o # internal
mkdir -p $WORK/_/home/???/working/13/_obj/
mkdir -p $WORK/_/home/???/working/13/_obj/exe/
cd /home/???/working/13
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/working/13.a -trimpath $WORK -p main -complete -buildid 5e1cd34265a1eb34ec7431fc0beb5221c9df7666 -D _/home/???/working/13 -I $WORK -I /home/???/gocode/pkg/linux_amd64 -pack ./3dbrowser.go
cd .
/usr/local/go/pkg/tool/linux_amd64/link -o $WORK/_/home/???/working/13/_obj/exe/a.out -L $WORK -L /home/???/gocode/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=5e1cd34265a1eb34ec7431fc0beb5221c9df7666 $WORK/_/home/???/working/13.a
mkdir -p /tmp/
mv $WORK/_/home/???/working/13/_obj/exe/a.out /tmp/compiled_gedit.a




build -x after "go get github.com/go-gl/glfw/v3.1/glfw"


WORK=/tmp/go-build682550076
mkdir -p $WORK/_/home/???/13/glwrap/_obj/
mkdir -p $WORK/_/home/???/13/
cd /home/???/13/glwrap
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/13/glwrap.a -trimpath $WORK -p _/home/???/13/glwrap -complete -buildid daf0a8b6b77d4bc483b6966f0a99f337241b5bdc -D _/home/???/13/glwrap -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./VBO.go ./program.go ./shaders.go ./texture.go
mkdir -p $WORK/_/home/???/13/shapes/_obj/
cd /home/???/13/shapes
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/13/shapes.a -trimpath $WORK -p _/home/???/13/shapes -complete -buildid 8d2c7f85f123481c001d6c89af4ef50ba7b52749 -D _/home/???/13/shapes -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./advanced.go ./basic.go ./draw.go ./general.go ./listReaders.go ./load.go
mkdir -p $WORK/_/home/???/13/_obj/
mkdir -p $WORK/_/home/???/13/_obj/exe/
cd /home/???/13
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/???/13.a -trimpath $WORK -p main -complete -buildid 5e1cd34265a1eb34ec7431fc0beb5221c9df7666 -D _/home/???/13 -I $WORK -I /home/???/gocode/pkg/linux_amd64 -pack ./3dbrowser.go
cd .
/usr/local/go/pkg/tool/linux_amd64/link -o $WORK/_/home/???/13/_obj/exe/a.out -L $WORK -L /home/???/gocode/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=5e1cd34265a1eb34ec7431fc0beb5221c9df7666 $WORK/_/home/???/13.a
mkdir -p /tmp/
mv $WORK/_/home/???/13/_obj/exe/a.out /tmp/compiled_gedit.a

Dave Cheney

unread,
Sep 28, 2015, 9:29:09 PM9/28/15
to golang-nuts
Always, always, always, use go install in preference to go build.

Dave

simon place

unread,
Sep 28, 2015, 11:05:03 PM9/28/15
to golang-nuts
why would you install your main package?

build -x is being used to find out what the compiler is doing, the problem shows up with go run which AFAIK is build plus execute.

Dave Cheney

unread,
Sep 28, 2015, 11:32:59 PM9/28/15
to golang-nuts
So that anything compiled transitively will be compiled and cached.

This will also leave the binary in GOPATH/bin, which is hsndy if it is in your path.

simon place

unread,
Sep 28, 2015, 11:41:27 PM9/28/15
to golang-nuts
so its expected behaviour for compilation to sometimes cache and sometimes not?
Message has been deleted

Charles Haynes

unread,
Sep 28, 2015, 11:43:56 PM9/28/15
to simon place, golang-nuts
It's expected behaviour for go install to cache, and go build to not cache. Yes.

-- Charles

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

simon place

unread,
Sep 28, 2015, 11:54:00 PM9/28/15
to golang-nuts, simon...@googlemail.com
what i seem to be getting is installed packages NOT being cached, after a variable delay.

Charles Haynes

unread,
Sep 29, 2015, 12:05:39 AM9/29/15
to simon place, golang-nuts
Could you please include the output of the go install command? What are you seeing that leads you to believe the packages are not being installed?

-- Charles

Dave Cheney

unread,
Sep 29, 2015, 12:30:27 AM9/29/15
to golang-nuts
I wrote about this on my blog a while back,


go build has some use cases, but for every day use, just stick with go install. For extra points, use go install -v so you can see what it's doing.

simon place

unread,
Sep 29, 2015, 12:36:17 AM9/29/15
to golang-nuts, simon...@googlemail.com


On Tuesday, 29 September 2015 05:05:39 UTC+1, Charles Haynes wrote:
Could you please include the output of the go install command?

i didn't use the install command, i used 'go get', there was no output at all
 
What are you seeing that leads you to believe the packages are not being installed?


???

i'm importing these packages, using them, what gave you the impression i thought they weren't installed.

 

simon place

unread,
Sep 29, 2015, 12:42:30 AM9/29/15
to golang-nuts
the problem appears using 'go get' and 'go run', i used build only to track down the problem, which it revealed was random onset of unnecessary compiling, could my backup software be interfering with file timestamps and making the packages look 'dirty'?

Dave Cheney

unread,
Sep 29, 2015, 12:58:53 AM9/29/15
to golang-nuts
Can you paste the output that Charles and I asked for, it should be pretty simple to figure out what is going on from there.
Message has been deleted

Charles Haynes

unread,
Sep 29, 2015, 1:01:53 AM9/29/15
to simon place, golang-nuts
Well you should use go get and go install rather than either go run or go build. But if you're seeing different behaviour without having changed your sources then I'd suspect something is triggering unnecessary builds. First I'd switch to go install like Dave says though.

-- Charles

--

simon place

unread,
Sep 29, 2015, 1:02:28 AM9/29/15
to golang-nuts

scratch that, i'm not backing up the installed sources.

time i turned in i think.

simon place

unread,
Sep 29, 2015, 12:33:13 PM9/29/15
to golang-nuts
the next time its on a go-slow, i'll try installing it to the library and see if it says anything.

simon place

unread,
Oct 11, 2015, 8:56:11 PM10/11/15
to golang-nuts
just to let anyone know that it returned, after nearly 2 weeks, which is much longer than previously;

but as before, 'go run' starts re-compiling the installed libraries each time, no change to setup, only about a minute or so between a fast compile and a slow one, (did happen roughly at midnight) and after 100+ compiles with no problem.

and re-installing the libraries or installing the 'main' package once,  fixes it temporarily.

the output you requested, when the compile is slow and  i use "go install" on the 'main' package with x option , is just the same as the OP; i can see the library recompiling, the first time, then after that, as is consistent with "go run" and "go build", it doesn't re-compile. (note i cant 'force' it to go-slow, its random.)

go install -x 3dbrowser.go
WORK=/tmp/go-build418793868
mkdir -p $WORK/github.com/go-gl/gl/v2.1/gl/_obj/
mkdir -p $WORK/github.com/go-gl/gl/v2.1/
cd /home/simon/gocode/src/github.com/go-gl/gl/v2.1/gl
CGO_LDFLAGS="-g" "-O2" "-lGL" "-lGL" /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -importpath github.com/go-gl/gl/v2.1/gl -- -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -DTAG_LINUX conversions.go debug.go package.go procaddr.go

gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -print-libgcc-file-name
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_main.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_main.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_export.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_export.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/conversions.cgo2.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/conversions.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/debug.cgo2.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/debug.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/package.cgo2.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/package.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -I $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -g -O2 -DTAG_LINUX -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/procaddr.cgo2.o -c $WORK/github.com/go-gl/gl/v2.1/gl/_obj/procaddr.cgo2.c
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_main.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_export.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/conversions.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/debug.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/package.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/procaddr.cgo2.o -g -O2 -lGL -lGL
/usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/go-gl/gl/v2.1/gl/_obj/ -dynpackage gl -dynimport $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_.o -dynout $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_import.go
gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_all.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_export.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/conversions.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/debug.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/package.cgo2.o $WORK/github.com/go-gl/gl/v2.1/gl/_obj/procaddr.cgo2.o -g -O2 -Wl,-r -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a -Wl,--build-id=none
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/github.com/go-gl/gl/v2.1/gl.a -trimpath $WORK -p github.com/go-gl/gl/v2.1/gl -buildid 920ac3646ba9e2d923c65e8837e4594eae50095e -D _/home/simon/gocode/src/github.com/go-gl/gl/v2.1/gl -I $WORK -pack $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_gotypes.go $WORK/github.com/go-gl/gl/v2.1/gl/_obj/conversions.cgo1.go $WORK/github.com/go-gl/gl/v2.1/gl/_obj/debug.cgo1.go $WORK/github.com/go-gl/gl/v2.1/gl/_obj/package.cgo1.go $WORK/github.com/go-gl/gl/v2.1/gl/_obj/procaddr.cgo1.go $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_cgo_import.go
pack r $WORK/github.com/go-gl/gl/v2.1/gl.a $WORK/github.com/go-gl/gl/v2.1/gl/_obj/_all.o # internal
mkdir -p /home/simon/gocode/pkg/linux_amd64/github.com/go-gl/gl/v2.1/
mv $WORK/github.com/go-gl/gl/v2.1/gl.a /home/simon/gocode/pkg/linux_amd64/github.com/go-gl/gl/v2.1/gl.a
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/glwrap/_obj/
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/
cd /home/simon/Dropbox/github/working/3dbrowser/glwrap
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/simon/Dropbox/github/working/3dbrowser/glwrap.a -trimpath $WORK -p _/home/simon/Dropbox/github/working/3dbrowser/glwrap -complete -buildid daf0a8b6b77d4bc483b6966f0a99f337241b5bdc -D _/home/simon/Dropbox/github/working/3dbrowser/glwrap -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./VBO.go ./program.go ./shaders.go ./texture.go
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/shapes/_obj/
cd /home/simon/Dropbox/github/working/3dbrowser/shapes
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/simon/Dropbox/github/working/3dbrowser/shapes.a -trimpath $WORK -p _/home/simon/Dropbox/github/working/3dbrowser/shapes -complete -buildid 0d2179006beef14f7bea6d019b1292f253ac4fef -D _/home/simon/Dropbox/github/working/3dbrowser/shapes -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./advanced.go ./basic.go ./draw.go ./general.go ./listReaders.go ./load.go
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p $WORK/command-line-arguments/_obj/exe/
cd /home/simon/Dropbox/github/working/3dbrowser
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/command-line-arguments.a -trimpath $WORK -p main -complete -buildid 666f889b9f378b290d653aad512687df031fe9c9 -D _/home/simon/Dropbox/github/working/3dbrowser -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./3dbrowser.go
cd .
/usr/local/go/pkg/tool/linux_amd64/link -o $WORK/command-line-arguments/_obj/exe/a.out -L $WORK -L /home/simon/gocode/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=666f889b9f378b290d653aad512687df031fe9c9 $WORK/command-line-arguments.a
mkdir -p .\gocode\bin/
mv $WORK/command-line-arguments/_obj/exe/a.out .\gocode\bin/3dbrowser


$ go install -x 3dbrowser.go
WORK=/tmp/go-build043121670
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/glwrap/_obj/
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/
cd /home/simon/Dropbox/github/working/3dbrowser/glwrap
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/simon/Dropbox/github/working/3dbrowser/glwrap.a -trimpath $WORK -p _/home/simon/Dropbox/github/working/3dbrowser/glwrap -complete -buildid daf0a8b6b77d4bc483b6966f0a99f337241b5bdc -D _/home/simon/Dropbox/github/working/3dbrowser/glwrap -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./VBO.go ./program.go ./shaders.go ./texture.go
mkdir -p $WORK/_/home/simon/Dropbox/github/working/3dbrowser/shapes/_obj/
cd /home/simon/Dropbox/github/working/3dbrowser/shapes
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/_/home/simon/Dropbox/github/working/3dbrowser/shapes.a -trimpath $WORK -p _/home/simon/Dropbox/github/working/3dbrowser/shapes -complete -buildid 0d2179006beef14f7bea6d019b1292f253ac4fef -D _/home/simon/Dropbox/github/working/3dbrowser/shapes -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./advanced.go ./basic.go ./draw.go ./general.go ./listReaders.go ./load.go
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p $WORK/command-line-arguments/_obj/exe/
cd /home/simon/Dropbox/github/working/3dbrowser
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/command-line-arguments.a -trimpath $WORK -p main -complete -buildid 666f889b9f378b290d653aad512687df031fe9c9 -D _/home/simon/Dropbox/github/working/3dbrowser -I $WORK -I /home/simon/gocode/pkg/linux_amd64 -pack ./3dbrowser.go
cd .
/usr/local/go/pkg/tool/linux_amd64/link -o $WORK/command-line-arguments/_obj/exe/a.out -L $WORK -L /home/simon/gocode/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=666f889b9f378b290d653aad512687df031fe9c9 $WORK/command-line-arguments.a
mkdir -p .\gocode\bin/
mv $WORK/command-line-arguments/_obj/exe/a.out .\gocode\bin/3dbrowser

Dave Cheney

unread,
Oct 11, 2015, 8:59:48 PM10/11/15
to golang-nuts
Your gopath is inside Dropbox, Dropbox is messing with the time stamps and making th go tool think the source files are newer than the compiled version.

simon place

unread,
Oct 11, 2015, 9:11:58 PM10/11/15
to golang-nuts
no, my code is, but GOPATH isn't.
i thought of that and turned off sync, it still happened, if it's still a possibility, somehow, i could remove my code from dropbox, but that would be a shame, i develop across several machines.

unread,
Oct 13, 2015, 11:43:43 AM10/13/15
to golang-nuts
I would suggest to speedup re-compilation of all C/C++ codes by using ccache:

- install ccache

$ cat ~/bin/ccache-gcc 
#!/bin/bash
exec ccache /usr/bin/gcc "$@"

$ cat ~/bin/ccache-g++
#!/bin/bash
exec ccache /usr/bin/g++ "$@"

$ cat ~/.bashrc  (relevant lines only)
export PATH="${HOME}/bin:${PATH}"
export CC="ccache-gcc"
export CXX="ccache-g++"

simon place

unread,
Oct 13, 2015, 10:36:36 PM10/13/15
to golang-nuts
thanks, that could come in useful, but now that i have discovered that installing the main package always fixes the 'go run', for a while, the overhead of doing that every so often isn't much, and its only this project with the opengl access libs.

Dave Cheney

unread,
Oct 13, 2015, 11:28:30 PM10/13/15
to golang-nuts
Can I encourage you to move away from go run. Go run is only intended for throwaway examples, the type you'd use the playground for. You are stretching go run behind its design, and are finding its limitations.

Thanks

Dave

simon place

unread,
Oct 14, 2015, 12:38:19 AM10/14/15
to golang-nuts
honestly i was really hoping you were wrong, i misunderstood, or i could just ignore the problem, because i was actually depressed by what you were saying, which seems to be;

'run', and 'build', are known buggy, (first i heard of this) so when you want to run some code you need to 'install' it, and then use a side-effect of an installation, that is, being able to execute the code from its installed location.

has this appearing in some docs i missed, or changed since i read them? i could use some clarification.

Charles Haynes

unread,
Oct 14, 2015, 12:45:21 AM10/14/15
to simon place, golang-nuts
I'm not sure I'd say it was "buggy" as much as it's a tool for a specific job and you're using it beyond it's design limits. Like trying to use a hammer to drive a screw. Dave is trying to hand you a screwdriver.

-- Charles

--

Dave Cheney

unread,
Oct 14, 2015, 12:50:32 AM10/14/15
to golang-nuts
I don't believe either are buggy. Run and build both build your code, then throw away the results. Run differs from build only in that it allows you to skip the creation of a source folder inside GOPATH.

If you want the go tool to cache intermediate packages, you must use go install.

I'm sorry this is a disappointment. I wrote more about this here, http://dave.cheney.net/2014/06/04/what-does-go-build-build

Thanks

Dave

simon place

unread,
Oct 14, 2015, 1:13:23 AM10/14/15
to golang-nuts
sorry, yes they always work.

(i have just been wondering if 'install' always caches intermediate packages or has the same behaviour eventually, since i haven't tested it long enough, but i guess thats what your saying, that it wouldn't suffer from this.)

but if they never cached 'intermediate packages' thats one thing, i would never have started using them for this, but when its caching 99% of the time, then just stops until some other apparently unrelated action is taken, its surprising behaviour.

simon place

unread,
Oct 14, 2015, 1:23:51 AM10/14/15
to golang-nuts
also, these are installed packages, i wouldn't have thought of them as intermediate packages, i would see them like the standard library, and always expect them to be cached by run or build.

unread,
Oct 14, 2015, 6:18:31 AM10/14/15
to golang-nuts
On Wednesday, October 14, 2015 at 4:36:36 AM UTC+2, simon place wrote:
thanks, that could come in useful, but now that i have discovered that installing the main package always fixes the 'go run', for a while, the overhead of doing that every so often isn't much, and its only this project with the opengl access libs.

Unfortunately, ccache currently doesn't work because go is passing absolute paths to the C compiler on the command line. Replacing those absolute paths with relative paths seems to fix the problem.

Reply all
Reply to author
Forward
0 new messages