I am trying to install HTK using Cygwin (32 bit) on a x86_64 computer build. This is part of the error I get when running
./configure
make all
gcc = 5.4.0, g++ = 5.4.0, perl = 5; I have X11 folder in C:/cygwin/usr/share
Let me know if I should post the entire error of the make file.
HSLab.c: In function ‘FileExists’:
HSLab.c:1209:12: warning: variable ‘isEXF’ set but not used [-Wunused-but-set-variable]
Boolean isEXF; /* File name is extended */
^
/tmp/ccZO1TK3.o: In function InitBar':
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:344: undefined reference toHTextWidth'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:348: undefined reference to HSetColour'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:349: undefined reference toHTextHeight'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:349: undefined reference to HPrintf'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:350: undefined reference toHSetGrey'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:351: undefined reference to `HFillRectangle'
Run
./configure --without-x --disable-hslab
to disable Xlib and HSLab
Overall, Cygwin is a bad idea, it is better to use Linux, you can install it in Virtualbox.
Related
I was following the guide in https://github.com/vim/vim/blob/master/src/INSTALLpc.txt
(Section 2 - Msys2 with MinGW)
I've installed msys2 and ran it through the mingw64 file in the msys64 directory, installed all dependencies, etc. I got until 2.4
2.4.
I navigated to the SRC folder of the vim 8.1 installation and ran the command, but I got this error when I run make -f Make_ming.mak GUI=no
$ make -f Make_ming.mak
g++ -I. -Iproto - ..[omitted].. -luuid
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/buffer.o:buffer.c:(.text+0xf01): undefined reference to `python3_buffer_free'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/eval.o:eval.c:(.text+0xea4): undefined reference to `set_ref_in_python3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x4505): undefined reference to `python3_enabled'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x6990): undefined reference to `do_py3eval'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x7bd2): undefined reference to `do_py3eval'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x277d): undefined reference to `ex_py3file'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x2891): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x28a1): undefined reference to `ex_py3do'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fa8): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fc8): undefined reference to `ex_py3do'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fe8): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x5008): undefined reference to `ex_py3file'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/main.o:main.c:(.text+0x2785): undefined reference to `python3_end'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/window.o:window.c:(.text+0x569a): undefined reference to `python3_window_free'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/window.o:window.c:(.text+0x6117): undefined reference to `python3_tabpage_free'
collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1042: gvim.exe] Error 1
I am slowly losing my mind, I've spent 3 days trying to get this to compile. I've also tried approaches with windows-native mingw32 (chocolatey), tried cross-compiling from WSL ubuntu, compiling inside of msys2 instead of mingw64 terminal.. The purpose of this is to eventually compile a specific version of vim (8.1) with a specific version of python (3.7).
Here is what is installed on my msys:
$ pacman -Qqe
base
base-devel
filesystem
mingw-w64-x86_64-binutils
mingw-w64-x86_64-crt-git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-ada
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-gcc-libgfortran
mingw-w64-x86_64-gcc-libs
mingw-w64-x86_64-gcc-objc
mingw-w64-x86_64-gdb
mingw-w64-x86_64-gdb-multiarch
mingw-w64-x86_64-headers-git
mingw-w64-x86_64-libgccjit
mingw-w64-x86_64-libmangle-git
mingw-w64-x86_64-libwinpthread-git
mingw-w64-x86_64-make
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-tools-git
mingw-w64-x86_64-winpthreads-git
mingw-w64-x86_64-winstorecompat-git
msys2-runtime
and the locations/versions of my compilers
C:\tools\msys64\mingw64\bin\mingw32-make.exe
C:\tools\msys64\mingw64\bin\gcc.exe
C:\tools\msys64\mingw64\bin\g++.exe
I most often refuse to request help unless I am extremely desperate and out of options, so I apologize if this question was written poorly or difficult to understand.
It seems that in Python 3.9, _Py_DEC_REFTOTAL was removed completely without any substitute. Thread (redhat.com). It will not build certain versions of vim. I installed Python3.6 through chocolatey, and everything compiled and linked perfectly.
For future reference, first install a version of python3 that works
(choco install python --version=3.6.7)
then use this in mingw64 shell in src folder of vim:
> mingw32-make -f Make_ming.mak PYTHON3=C:/Python36
PYTHON3_HOME=C:/Python36 PYTHON3INC=-IC:/Python36/include DYNAMIC_PYTHON3=yes
PYTHON3_VER=36 DYNAMIC_PYTHON3_DLL=libpython36.dll
STATIC_STDCPLUS=yes
I want to install a latest Mono version on my CentOS (i686). As there is no ready to use binary distribution I tried to pull the latest Mono Source 3.2.3 from here. After pulling the source, I extracted it, change directory to it and tried below sequence of commands -
[root#localhost mono-3.2.3]# ./configure
No problems reported
[root#localhost mono-3.2.3]# make
make[3]: Entering directory `/usr/local/src/mono-3.2.3/mono/metadata'
CCLD pedump
./.libs/libmonoruntime.a(libmonoruntime_la-assembly.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-assembly.o): In function `InterlockedIncrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedIncrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-cominterop.o): In function `InterlockedDecrement':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:66: undefined reference to `__sync_add_and_fetch_4'
./.libs/libmonoruntime.a(libmonoruntime_la-image.o):/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:61: more undefined references to `__sync_add_and_fetch_4' follow
./.libs/libmonoruntime.a(libmonoruntime_la-marshal.o): In function `InterlockedCompareExchangePointer':
/usr/local/src/mono-3.2.3/mono/metadata/../../mono/utils/atomic.h:56: undefined reference to `__sync_val_compare_and_swap_4'
./.libs/libmonoruntime.a(libmonoruntime_la-marshal.o): In function `InterlockedExchangePointer':
While trying to resolve this I found this,this and this. I tried to implement the solution mentioned there but had no luck.
Has anybody faced this?
Regards,
Omky
I added two compiler switches in make file.
CPPFLAGS = -m32 -march=i686
This worked for me.
I'm currently trying to compile suricata (http://suricata-ids.org/) with luajit support on my arch linux distribution with these commands:
./configure --enable-luajit --with-libpcap-includes=/usr/local/pfring/include \
--with-libpcap-libraries=/usr/local/pfring/lib --with-libnss-libraries=/usr/lib \
--with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib \
--with-libnspr-includes=/usr/include/nspr \
--with-libluajit-includes=/usr/local/include/luajit-2.0/ \
--with-libluajit-libraries=/usr/lib/
then:
make
but I get the following errors when I make the project:
detect-luajit.o: In function `LuaDumpStack':
detect-luajit.c:(.text+0x46e): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatchBuffer':
detect-luajit.c:(.text+0x5d6): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x6b9): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x7d5): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatch':
detect-luajit.c:(.text+0xaac): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0xde4): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0xf00): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitThreadInit':
detect-luajit.c:(.text+0x1864): undefined reference to `lua_pcallk'
detect-luajit.o: In function `DetectLuaSetupPrime':
detect-luajit.c:(.text+0x1fe7): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x2167): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x24bf): undefined reference to `lua_pcallk'
collect2: error: ld returned 1 exit status
make[2]: *** [suricata] Error 1
I first though it was an issue coming from the lua version. So I tried to install both the lua 5.1.5 and 5.2.2, remaking the library and symbolic links as well, and nothing worked.
Thanks for your help
In Debian and Ubuntu, the library files are installed into /usr/lib/x86_64-linux-gnu/. If arch does the same, your configure line should include: --with-libluajit-libraries=/usr/lib/x86_64-linux-gnu/
I've spent quite a bit of time trying to get an expat based sample program to compile.
I was receiving the following error message when I tried to compile
gcc -Wall -lexpat line.c -o blah
line.c: In function ‘main’:
line.c:99:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘XML_Size’ [-Wformat]
/tmp/ccUa3vfD.o: In function `printcurrent':
line.c:(.text+0x42): undefined reference to `XML_SetDefaultHandler'
line.c:(.text+0x4d): undefined reference to `XML_DefaultCurrent'
line.c:(.text+0x60): undefined reference to `XML_SetDefaultHandler'
/tmp/ccUa3vfD.o: In function `main':
line.c:(.text+0x162): undefined reference to `XML_ParserCreate'
line.c:(.text+0x1ad): undefined reference to `XML_UseParserAsHandlerArg'
line.c:(.text+0x1c9): undefined reference to `XML_SetElementHandler'
line.c:(.text+0x1dd): undefined reference to `XML_SetCharacterDataHandler'
line.c:(.text+0x1f1): undefined reference to `XML_SetProcessingInstructionHandler'
line.c:(.text+0x2b2): undefined reference to `XML_Parse'
line.c:(.text+0x2c2): undefined reference to `XML_GetErrorCode'
line.c:(.text+0x2ca): undefined reference to `XML_ErrorString'
line.c:(.text+0x2d8): undefined reference to `XML_GetCurrentLineNumber'
collect2: ld returned 1 exit status
I had already run the following commands:
sudo apt-get install expat libexpat1 libexpat1-dev libxmltok1-dev
So I messed around for ages, trying to get the error message to go away so I could compile this (simple) little program, but to no avail.
Eventually, out of sheer randomness, I decided to switch to a Virtual Terminal.
I ran exactly the same command, this time it worked without a problem.
Can anyone tell me why this is? Is there something I need to run in order to refresh the library paths?
The linker line (i.e. the flags you give with -l and your input file names) are order-dependent. Libraries are only used to define functions used on their left side, but not on their right. Use:
gcc -Wall line.c -lexpat -o blah
See the question library is linked but reference is undefined for more information.
I'm trying to compile the oauth-utils
http://mir.dnsalias.com/oss/oauth/start
for Windows from Ubuntu. I have compiled it on Windows before
(a few months back), but wanted to try cross-compiling.
I got openssl build using mingw32 ok, and put
libssl.a and libcrypto.a in the right place. The linker is now
finding the libraries (yay!) but I get the following error:
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaac): undefined reference to `_CreateDCA#16'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xab9): undefined reference to `_CreateCompatibleDC#4'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xacc): undefined reference to `_GetDeviceCaps#8'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xadc): undefined reference to `_GetDeviceCaps#8'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaf4): undefined reference to `_CreateCompatibleBitmap#12'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb04): undefined reference to `_SelectObject#8'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb18): undefined reference to `_GetObjectA#12'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb81): undefined reference to `_BitBlt#36'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xb8c): undefined reference to `_GetBitmapBits#12'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbe5): undefined reference to `_SelectObject#8'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbec): undefined reference to `_DeleteObject#4'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xbf6): undefined reference to `_DeleteDC#4'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xc00): undefined reference to `_DeleteDC#4'
Any ideas what could be causing this?
Thanks.
Link with Gdi32.lib
Which version of OpenSSL are you trying to compile?
In general, I have found version 1.0 and newer with MinGW-w64 to work great.
See for example the OpenSSL cross-compilation for Windows tutorial.
It seems that if one remove everything between
static void readscreen(void)
{
#if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
and
#endif /* !OPENSSL_SYS_WINCE */
}
in rand_win.c, that building works. I'm not 100% sure how safe removing this is.
Are you adding -mwindows to your link command?