On Jan 11, 2012, at 5:20 AM, Dave Webb wrote:

> Hi all,
> 
>> https://github.com/nickg/ghdl/tree/nick
> I just forked that
> https://github.com/davewebb8211/ghdl
> and pushed my changes. At least it compiles with gcc-4.6.0.
> 
> As mentioned before, it compiles but now I'm stuck at make install.all
> in ./translate/ghdldrv. I get ghdl1-gcc:*command-line*: cannot find
> "std" library. This is a small improvement to my last post. I haven't
> understand all the gimple tree stuff.
> 

I got a little further.  Having libiconv problems with Macports stopping me 
from generating ghdl1 now.

You're github ghdl looks like it may not be up to date:
 ,,,
/opt/gcc-4.6.0-x86_64/bin/gcc   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings 
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o 
build/gengtype \
            build/gengtype.o build/errors.o build/gengtype-lex.o 
build/gengtype-parse.o build/gengtype-state.o build/version.o 
../build-x86_64-apple-darwin11/libiberty/libiberty.a
/bin/sh ../../untar/gcc-4.6.0/gcc/../move-if-change tmp-gi.list gtyp-input.list
echo timestamp > s-gtyp-input
build/gengtype  \
                    -S ../../untar/gcc-4.6.0/gcc -I gtyp-input.list -w 
gtype.state
../../untar/gcc-4.6.0/gcc/vhdl/ortho-lang.c:766: parse error: GTY must be 
specified before identifier
../../untar/gcc-4.6.0/gcc/vhdl/ortho-lang.c:771: parse error: GTY must be 
specified before identifier
../../untar/gcc-4.6.0/gcc/vhdl/ortho-lang.c:776: parse error: GTY must be 
specified before identifier
../../untar/gcc-4.6.0/gcc/vhdl/ortho-lang.c:781: parse error: GTY must be 
specified before identifier
make[2]: *** [s-gtype] Error 1
make[1]: *** [all-gcc] Error 2

 Fixed by:

diff -u ortho-lang.c ~/Desktop/ortho-lang.c
--- ortho-lang.c        2012-01-12 23:48:29.000000000 +1300
+++ /Users/david_koontz/Desktop/ortho-lang.c    2012-01-13 00:38:55.000000000 
+1300
@@ -760,24 +760,24 @@
 //};
 //#undef DEFTREECODE
 
-union lang_tree_node 
+union 
   GTY((desc ("0"),
-       chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
+       chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)"))) 
lang_tree_node 
 {
   union tree_node GTY ((tag ("0"))) generic;
 };
 
-struct lang_decl GTY(())
+struct GTY(()) lang_decl 
 {
   char dummy;
 };
 
-struct lang_type GTY (())
+struct GTY (()) lang_type
 {
   char dummy;
 };
 
-struct language_function GTY (())
+struct GTY (()) language_function 
 {
   char dummy;
 };

All this using the SourceForge gcc/gnat, and some libs from Macports 
(/opt/local).

This might might be the ghdl1 being linked, (--enable-language=vhdl ):

/opt/gcc-4.6.0-x86_64/bin/gcc   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings 
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute 
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H  -o cc1 c-lang.o 
c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o 
c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o 
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o 
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o 
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o 
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o 
darwin-c.o \
          cc1-checksum.o main.o  libbackend.a ../libcpp/libcpp.a 
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv  
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lppl_c -lppl  
-lgmpxx -L/opt/local/lib -L/opt/local/lib 
-L/Users/david_koontz/ghdl-osx/build/./mpc/src/.libs -lmpc -lmpfr -lgmp   
-L../zlib -lz
Undefined symbols for architecture x86_64:
  "_iconv_open", referenced from:
      _init_iconv_desc in libcpp.a(charset.o)
      __nl_init_domain_conv in libintl.a(loadmsgcat.o)
  "_iconv", referenced from:
      _convert_using_iconv in libcpp.a(charset.o)
      __nl_find_msg in libintl.a(dcigettext.o)
     (maybe you meant: __cpp_destroy_iconv, _cpp_init_iconv )
  "_iconv_close", referenced from:
      __cpp_destroy_iconv in libcpp.a(charset.o)
      __cpp_convert_input in libcpp.a(charset.o)
      __nl_free_domain_conv in libintl.a(loadmsgcat.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2



Examining libiconv:

david_koontz@Macbook: ll libiconv*
/usr/lib
lrwxr-xr-x  1 root  wheel       16 Jul 25 20:44 libiconv.2.4.0.dylib@ -> 
libiconv.2.dylib
-r-xr-xr-x  1 root  wheel  2105216 Jul 25 20:43 libiconv.2.dylib*
lrwxr-xr-x  1 root  wheel       20 Jul 25 20:44 libiconv.dylib@ -> 
libiconv.2.4.0.dylib
david_koontz@Macbook: nm libiconv.2.dylib | grep iconv
00000000000f1af0 S ___iconv_2VersionNumber
00000000000f1b90 S ___iconv_2VersionString
00000000000f60f0 D __libiconv_version
000000000000a1e1 T _iconv
000000000000a5a0 T _iconv_canonicalize
0000000000013164 T _iconv_close
0000000000013171 T _iconv_open
000000000000a72c T _iconvctl
000000000000a20f T _iconvlist
0000000000014dbd T _libiconv_relocate
0000000000014cff T _libiconv_set_relocation_prefix

The one in /usr/lib has the symbols.

The two in /opt/local/lib don't contain the symbols:

david_koontz@Macbook: !ll
ll libiconv*
/opt/local/lib
-rw-r--r--  1 root  admin  1072264 Aug 24 21:56 libiconv.2.dylib
-rw-r--r--  1 root  admin  1098856 Aug 24 21:56 libiconv.a
lrwxr-xr-x  1 root  admin       16 Aug 24 21:56 libiconv.dylib@ -> 
libiconv.2.dylib
-rw-r--r--  1 root  admin      914 Aug 24 21:56 libiconv.la
david_koontz@Macbook: !nm
nm libiconv.2.dylib | grep iconv
00000000000fa0c0 D __libiconv_version
000000000000b440 T _iconv_canonicalize
000000000000b040 T _libiconv
0000000000016220 T _libiconv_close
0000000000016230 T _libiconv_open
0000000000015180 T _libiconv_open_into
00000000000170f0 t _libiconv_relocate
0000000000017030 T _libiconv_set_relocation_prefix
000000000000b5f0 T _libiconvctl
000000000000b080 T _libiconvlist
david_koontz@Macbook: 
david_koontz@Macbook: nm libiconv.a | grep iconv
libiconv.a(iconv.o):
0000000000016780 D __libiconv_version
000000000000ac10 T _iconv_canonicalize
00000000000f9908 S _iconv_canonicalize.eh
000000000000a810 T _libiconv
00000000000f97d0 S _libiconv.eh
00000000000159f0 T _libiconv_close
00000000000fa6c0 S _libiconv_close.eh
0000000000015a00 T _libiconv_open
00000000000fa6f0 S _libiconv_open.eh
0000000000014950 T _libiconv_open_into
00000000000fa518 S _libiconv_open_into.eh
000000000000adc0 T _libiconvctl
00000000000f9940 S _libiconvctl.eh
000000000000a850 T _libiconvlist
00000000000f9830 S _libiconvlist.eh
libiconv.a(localcharset.o):
libiconv.a(relocatable.o):
00000000000000c0 T _libiconv_relocate
00000000000001d0 S _libiconv_relocate.eh
0000000000000000 T _libiconv_set_relocation_prefix
0000000000000198 S _libiconv_set_relocation_prefix.eh

Says it's trying to link libiconv in /opt/local/lib, and it doesn't contain 
matching symbols.  The one in /usr/lib is also a dual architecture dylib, i386 
and x86_64.

Once I figure out to get the right one specified (and there'll be the matching 
includes) I just may have linked cc1 (ghdl1) (fingers crossed). 


 

Attachment: script
Description: Binary data

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to