Closed 48004800 closed 1 year ago
You need to add '-lgnat' to the linker flags. Maybe do: make LDFLAGS=-lgnat
You need to add '-lgnat' to the linker flags. Maybe do: make LDFLAGS=-lgnat
cannot find - lgnat
I built yosys separately through Cygwin. But I need to remove the - fPIC in the Makefile, and I'm not sure if 'undefined reference to……' is related to this.
You need to add '-lgnat' to the linker flags. Maybe do: make LDFLAGS=-lgnat
I want to ask a simple question first. If I want to build this plugin on Windows, what tools do I need in the step of building yosys.
In addition to a C++ compiler, you need to install the gnat compiler. On mingw64, just do: pacman -S mingw-w64-x86_64-gcc-ada
In addition to a C++ compiler, you need to install the gnat compiler. On mingw64, just do: pacman -S mingw-w64-x86_64-gcc-ada
What is the reason for this error?
‘strdup’ was not declared in this scope; did you mean ‘strcmp’?
Probably a missing #include; what is the context of the error ?
Probably a missing #include; what is the context of the error ?
I have solved it now by modifying the makefile and changing c++11 to gnu++11.
Probably a missing #include; what is the context of the error ?
I have now built yosys separately using gcc. I can build GHDL and yosys separately. But I can't build plugins The following issues occurred while building yosys. I use msys2.
It's not possible to build the plugin as a shared library (module) on Windows, because yosys does not support loading them on that platform. It needs to be built-in.
It's not possible to build the plugin as a shared library (module) on Windows, because yosys does not support loading them on that platform. It needs to be built-in.
I am indeed trying to follow this step. Which step did I take wrong? I failed to build yosys, which should be the last step in the entire process.
None, but the instructions are old and mainly unused.
You need to link with -lgnat
None, but the instructions are old and mainly unused. You need to link with -lgnat
I don't know exactly what's missing
$ make LDFLAGS=-lgnat [Makefile.conf] CONFIG := gcc [Makefile.conf] ENABLE_GHDL := 1 [Makefile.conf] GHDL_PREFIX := "C:\ghdl-3.0.0\build\PREFIX" [100%] Building yosys /usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lgnat: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:743: yosys] Error 1
Ok, in "C:\ghdl-3.0.0\build\PREFIX\lib" there should be a libghdl.link file. What is the content of it ?
Ok, in "C:\ghdl-3.0.0\build\PREFIX\lib" there should be a libghdl.link file. What is the content of it ?
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a
Ok, that's where is libgnat.
However, I think there is a missing ')' in the yosys Makefile, at the end of this line:
LDLIBS += $(GHDL_LIB_DIR)/libghdl.a $(file <$(GHDL_LIB_DIR)/libghdl.link)
I suppose it will link correctly if you just add a ')'.
I haven't made any changes yet. It doesn't seem like there's a problem.
So yes, there is a missing ')'.
So yes, there is a missing ')'.
This seems incorrect
Oops sorry. What is your version of make ?
This is the last one.
What is the link command displayed by make ?
This is the last one. What is the link command displayed by make ?
Sorry, I don't understand what a link command is. Is it the information displayed after I input the make command?
You need to use 'make PRETTY=0' to get a verbose but complete output.
In the Makefile, can you replace
$(file <$(GHDL_LIB_DIR)/libghdl.link)
with
$(shell cat $(GHDL_LIB_DIR)/libghdl.link)
$ make
[Makefile.conf] ENABLE_GHDL := 1
[Makefile.conf] GHDL_PREFIX := "C:\ghdl-3.0.0\build\PREFIX"
[Makefile.conf] CONFIG := gcc
[100%] Building yosys
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:\ghdl-3.0.0\build\PREFIX/lib/libghdl.a(grt-cstdio.o): in function `fprintf':
C:\ghdl-3.0.0\build/C:/ghdl-3.0.0/src/grt/grt-cstdio.c:364: undefined reference to `__mingw_vfprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:\ghdl-3.0.0\build\PREFIX/lib/libghdl.a(grt-cstdio.o): in function `snprintf':
C:\ghdl-3.0.0\build/C:/ghdl-3.0.0/src/grt/grt-cstdio.c:462: undefined reference to `__mingw_vsnprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:\ghdl-3.0.0\build\PREFIX/lib/libghdl.a(grt-cstdio.o): in function `__ghdl_get_stdout':
C:\ghdl-3.0.0\build/C:/ghdl-3.0.0/src/grt/grt-cstdio.c:28: undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:\ghdl-3.0.0\build\PREFIX/lib/libghdl.a(grt-cstdio.o): in function `__ghdl_get_stdin':
C:\ghdl-3.0.0\build/C:/ghdl-3.0.0/src/grt/grt-cstdio.c:34: undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:\ghdl-3.0.0\build\PREFIX/lib/libghdl.a(grt-cstdio.o): in function `__ghdl_get_stderr':
C:\ghdl-3.0.0\build/C:/ghdl-3.0.0/src/grt/grt-cstdio.c:40: undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x4e): undefined reference to `__imp__wsplitpath'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x171): undefined reference to `__imp_wcscat_s'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1b1): undefined reference to `__imp_wcscat_s'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1e3): undefined reference to `__imp_wcscat_s'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x575): undefined reference to `__imp__time64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x59e): undefined reference to `__imp__time64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x5ae): undefined reference to `__imp__localtime64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x63e): undefined reference to `__imp__gmtime64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x723): undefined reference to `__imp__mktime64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x7fd): undefined reference to `__imp_wcscpy_s'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x808): undefined reference to `__imp_wcscat_s'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x844): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x951): undefined reference to `__imp__wgetcwd'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xb0b): undefined reference to `__imp__wunlink'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xbb2): undefined reference to `__imp__wrename'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xc2b): undefined reference to `__imp__wchdir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xc9b): undefined reference to `__imp__wrmdir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xd65): undefined reference to `__imp__wfopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xe4f): undefined reference to `__imp__wfreopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xf15): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0xfb5): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1055): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x10e6): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1176): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1215): more undefined references to `__imp__wopen' follow
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1335): undefined reference to `__imp__open'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x13b6): undefined reference to `__imp__wopen'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1428): undefined reference to `__mingw_snprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1448): undefined reference to `__imp__tempnam'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x150a): undefined reference to `_wopendir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x153d): undefined reference to `_wreaddir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1d4d): undefined reference to `__imp__fstat64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x1db2): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x20fd): undefined reference to `__imp__fstat64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x2310): undefined reference to `__imp__waccess'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x2530): undefined reference to `__imp__waccess'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x3092): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x30d2): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x30f2): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x350b): undefined reference to `__imp__wgetenv'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x3808): undefined reference to `lseek64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(adaint.o):(.text+0x15a1): undefined reference to `_wclosedir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(argv.o):(.rdata$.refptr.__imp__environ[.refptr.__imp__environ]+0x0): undefined reference to `__imp__environ'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x32): undefined reference to `__mingw_vfprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x84): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x96): undefined reference to `__mingw_vfscanf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x12e): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x15e): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cio.o):(.text+0x19e): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0x38): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0x45): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0x58): more undefined references to `__imp___acrt_iob_func' follow
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0x8a): undefined reference to `__imp__fullpath'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0xe3): undefined reference to `__imp__ftelli64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0xf3): undefined reference to `__imp__fseeki64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(cstreams.o):(.text+0x11d): undefined reference to `__imp__stat64'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(env.o):(.text+0x6b): undefined reference to `__mingw_sprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(env.o):(.text+0xc8): undefined reference to `__mingw_sprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(errno.o):(.text+0x6): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(errno.o):(.text+0x29): undefined reference to `__imp__errno'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(mkdir.o):(.text+0x50): undefined reference to `__imp__wmkdir'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x1d1): undefined reference to `getch'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x245): undefined reference to `kbhit'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x2b7): undefined reference to `getch'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x30d): undefined reference to `kbhit'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x331): undefined reference to `getch'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(sysdep.o):(.text+0x3a7): undefined reference to `getch'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(raise-gcc.o):(.text+0x2b): undefined reference to `__mingw_vfprintf'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(raise-gcc.o):(.text+0x262): undefined reference to `__imp___acrt_iob_func'
/usr/lib/gcc/x86_64-pc-msys/11.3.0/../../../../x86_64-pc-msys/bin/ld: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/13.1.0/adalib/libgnat.a(raise-gcc.o):(.text+0x2a8): undefined reference to `__mingw_vfprintf'
collect2: error: ld returned 1 exit status
make: *** [Makefile:743: yosys] Error 1
That's much better, but it looks like you are compiling yosys for msys but ghdl for mingw. They are not compatible.
That's much better, but it looks like you are compiling yosys for msys but ghdl for mingw. They are not compatible.
So do I need to use msys2 mingw64?
That's much better, but it looks like you are compiling yosys for msys but ghdl for mingw. They are not compatible.
I am currently using msys2 UCRT64.
QQ109@Mine UCRT64 /c/yosys-yosys-0.29 $ make [Makefile.conf] ENABLE_GHDL := 1 [Makefile.conf] GHDL_PREFIX := "C:\ghdl-3.0.0\build\PREFIX" [Makefile.conf] CONFIG := gcc [100%] Building yosys gcc.exe: error: unrecognized command-line option '-rdynamic' make: *** [Makefile:743: yosys] Error 1
I can successfully build ghdl and yosys separately.
However, a large number of "undefined reference to……'"errors may occur when building plugins. Because my operating system is Windows. I built the plugin using the second method. (Build as part of yosys)
When I try to build yosys(The final step in building plugins), the following error occurs.