Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: remove fixed limit on number of MachoLoad entries #1571

Closed
gopherbot opened this issue Mar 2, 2011 · 7 comments
Closed

ld: remove fixed limit on number of MachoLoad entries #1571

gopherbot opened this issue Mar 2, 2011 · 7 comments

Comments

@gopherbot
Copy link
Contributor

by j.christoff25:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1.6g demo.go
6l demo.6
2.
3.

What is the expected output?
a working demo

What do you see instead?
too many loads


Which compiler are you using (5g, 6g, 8g, gccgo)?
I use the "make install", followed by "make example"

Which operating system are you using?
Darwin AMD64 on a Imac 10.6

Which revision are you using?  (hg identify)
117785e448a6+ tip

Please provide any additional information below.

I clone the file with git clone https://github.com/mattn/go-gtk.git
This program will compile & link using 8g & 8l. I have tried to link this demo
with several versions of GO in the past. All yield the same error,"too many
loads". What does "too many loads" mean?


The following is the message I get when using "make install', followed by
"make example"

jchristoffs-iMac:go-gtk jim$ make install
cd glib && gomake install
CGOPKGPATH= cgo -- `pkg-config --cflags glib-2.0 gobject-2.0` glib.go
touch _cgo_run
6g -o _go_.6  glib.cgo1.go _cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 _cgo_defun.c
gcc -m64 -g -fPIC -O2 -o _cgo_main.o -c `pkg-config --cflags glib-2.0 gobject-2.0` 
_cgo_main.c
gcc -m64 -g -fPIC -O2 -o glib.cgo2.o -c `pkg-config --cflags glib-2.0 gobject-2.0` 
glib.cgo2.c
gcc -m64 -g -fPIC -O2 -o _cgo_export.o -c `pkg-config --cflags glib-2.0 gobject-2.0` 
_cgo_export.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o glib.cgo2.o _cgo_export.o `pkg-config
--libs glib-2.0 gobject-2.0` 
cgo -dynimport _cgo1_.o >__cgo_import.c && mv -f __cgo_import.c _cgo_import.c
6c -FVw _cgo_import.c
rm -f _obj/glib.a
gopack grc _obj/glib.a _go_.6  _cgo_defun.6 _cgo_import.6 glib.cgo2.o _cgo_export.o
cp _obj/glib.a "/Users/jim/go/pkg/darwin_amd64/glib.a"
cd gdk && gomake install
CGOPKGPATH= cgo -- `pkg-config --cflags gdk-2.0` gdk.go
touch _cgo_run
6g -o _go_.6  gdk.cgo1.go _cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 _cgo_defun.c
gcc -m64 -g -fPIC -O2 -o _cgo_main.o -c `pkg-config --cflags gdk-2.0`  _cgo_main.c
gcc -m64 -g -fPIC -O2 -o gdk.cgo2.o -c `pkg-config --cflags gdk-2.0`  gdk.cgo2.c
gcc -m64 -g -fPIC -O2 -o _cgo_export.o -c `pkg-config --cflags gdk-2.0`  _cgo_export.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o gdk.cgo2.o _cgo_export.o `pkg-config
--libs gdk-2.0 gthread-2.0` 
cgo -dynimport _cgo1_.o >__cgo_import.c && mv -f __cgo_import.c _cgo_import.c
6c -FVw _cgo_import.c
rm -f _obj/gdk.a
gopack grc _obj/gdk.a _go_.6  _cgo_defun.6 _cgo_import.6 gdk.cgo2.o _cgo_export.o
cp _obj/gdk.a "/Users/jim/go/pkg/darwin_amd64/gdk.a"
cd gdkpixbuf && gomake install
CGOPKGPATH= cgo -- `pkg-config --cflags gdk-pixbuf-2.0` gdkpixbuf.go
touch _cgo_run
6g -I ../glib/_obj -o _go_.6  gdkpixbuf.cgo1.go _cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 _cgo_defun.c
gcc -m64 -g -fPIC -O2 -o _cgo_main.o -c `pkg-config --cflags gdk-pixbuf-2.0`  _cgo_main.c
gcc -m64 -g -fPIC -O2 -o gdkpixbuf.cgo2.o -c `pkg-config --cflags gdk-pixbuf-2.0` 
gdkpixbuf.cgo2.c
gcc -m64 -g -fPIC -O2 -o _cgo_export.o -c `pkg-config --cflags gdk-pixbuf-2.0` 
_cgo_export.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o gdkpixbuf.cgo2.o _cgo_export.o `pkg-config
--libs gdk-pixbuf-2.0` 
cgo -dynimport _cgo1_.o >__cgo_import.c && mv -f __cgo_import.c _cgo_import.c
6c -FVw _cgo_import.c
rm -f _obj/gdkpixbuf.a
gopack grc _obj/gdkpixbuf.a _go_.6  _cgo_defun.6 _cgo_import.6 gdkpixbuf.cgo2.o
_cgo_export.o
cp _obj/gdkpixbuf.a "/Users/jim/go/pkg/darwin_amd64/gdkpixbuf.a"
cd gtk && gomake install
CGOPKGPATH= cgo -- `pkg-config --cflags gtk+-2.0 gtksourceview-2.0` gtk.go
touch _cgo_run
6g -I ../glib/_obj -I ../gdk/_obj -I ../gdkpixbuf/_obj -o _go_.6  gtk.cgo1.go
_cgo_gotypes.go
6c -FVw -I/Users/jim/go/pkg/darwin_amd64 _cgo_defun.c
gcc -m64 -g -fPIC -O2 -o _cgo_main.o -c `pkg-config --cflags gtk+-2.0 gtksourceview-2.0`
 _cgo_main.c
gcc -m64 -g -fPIC -O2 -o gtk.cgo2.o -c `pkg-config --cflags gtk+-2.0 gtksourceview-2.0` 
gtk.cgo2.c
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_set_artists':
gtk.go:1655: warning: passing argument 2 of 'gtk_about_dialog_set_artists' from
incompatible pointer type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_get_documenters':
gtk.go:2377: warning: assignment discards qualifiers from pointer target type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_set_documenters':
gtk.go:5071: warning: passing argument 2 of 'gtk_about_dialog_set_documenters' from
incompatible pointer type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_make_strings':
gtk.go:6935: warning: assignment from incompatible pointer type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_get_authors':
gtk.go:8005: warning: assignment discards qualifiers from pointer target type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_set_authors':
gtk.go:9161: warning: passing argument 2 of 'gtk_about_dialog_set_authors' from
incompatible pointer type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_next_gcharptr':
gtk.go:9430: warning: assignment from incompatible pointer type
gtk.go: In function '_cgo_17e138e95a5d_Cfunc_gtk_about_dialog_get_artists':
gtk.go:9704: warning: assignment discards qualifiers from pointer target type
gcc -m64 -g -fPIC -O2 -o _cgo_export.o -c `pkg-config --cflags gtk+-2.0
gtksourceview-2.0`  _cgo_export.c
gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o gtk.cgo2.o _cgo_export.o -lpthread
`pkg-config --libs gtk+-2.0 gtksourceview-2.0` 
cgo -dynimport _cgo1_.o >__cgo_import.c && mv -f __cgo_import.c _cgo_import.c
6c -FVw _cgo_import.c
rm -f _obj/gtk.a
gopack grc _obj/gtk.a _go_.6  _cgo_defun.6 _cgo_import.6 gtk.cgo2.o _cgo_export.o
cp _obj/gtk.a "/Users/jim/go/pkg/darwin_amd64/gtk.a"
jchristoffs-iMac:go-gtk jim$ make example
cd glib && gomake install
cd gdk && gomake install
cd gdkpixbuf && gomake install
cd gtk && gomake install
cd example && gomake
cd demo && gomake
6g -o _go_.6 demo.go 
6l -o demo _go_.6
too many loads
make[2]: *** [demo] Error 1
make[1]: *** [all] Error 2
make: *** [example] Error 2
jchristoffs-iMac:go-gtk jim$

Attachments:

  1. demo.go (9763 bytes)
@rsc
Copy link
Contributor

rsc commented Mar 2, 2011

Comment 1:

It means your Mac program is trying to link in more than 16 libraries.

Status changed to HelpWanted.

@rsc
Copy link
Contributor

rsc commented Mar 2, 2011

Comment 2:

Issue #1570 has been merged into this issue.

@gopherbot
Copy link
Contributor Author

Comment 3 by hdante:

I have the exact same problem. All the questions above have exactly the same answer,
except revision:
c5c62aeb6267 release.r56/weekly.2011-03-07.1/release

@gopherbot
Copy link
Contributor Author

Comment 4 by j.christoff25:

To fix it I had to increase the size of a couple memory locations and it
work. If you need I can send you the changes needed. They are pretty simple.

@rsc
Copy link
Contributor

rsc commented Mar 29, 2011

Comment 5:

Sure.  Please see http://golang.org/doc/contribute.html.  Thanks!
Russ

@gopherbot
Copy link
Contributor Author

Comment 6 by hdante:

Can you send me the patch ? Thanks,

@rsc
Copy link
Contributor

rsc commented Apr 20, 2011

Comment 7:

This issue was closed by revision 047e698.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants