Page 1 of 1

Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 03 Oct 2014 10:04
by alexvlcprot
I'v been solving some issues and dependencies with libraries when compiling VLC2.2 for Windows on Ubuntu 14.01, but now I'm blocked with the next issue:

/home/alex/Work/vlc/contrib/i686-w64-mingw32/lib/libx265.a(param.cpp.obj): In function `ZN4x26512parseCpuNameEPKcRb':
/home/buildslave/vlc-contrib-win32-x86/build/contrib/win/x265/source/common/param.cpp:775: undefined reference to `strtok_r'
/home/alex/Work/vlc/contrib/i686-w64-mingw32/lib/libx265.a(param.cpp.obj): In function `ZN4x26515parseLambdaFileEP10x265_param':
/home/buildslave/vlc-contrib-win32-x86/build/contrib/win/x265/source/common/param.cpp:1332: undefined reference to `strtok_r'
collect2: error: ld returned 1 exit status
make[4]: *** [libx265_plugin.la] Error 1
make[4]: se sale del directorio «/home/alex/Work/vlc/win32/modules»
make[3]: *** [all-recursive] Error 1
make[3]: se sale del directorio «/home/alex/Work/vlc/win32/modules»
make[2]: *** [all] Error 2
make[2]: se sale del directorio «/home/alex/Work/vlc/win32/modules»
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio «/home/alex/Work/vlc/win32»
make: *** [all] Error 2

I've looking for this strtok_r function, and I've tried to add string.h to the /include folder, but it hasn't worked...

I've been following all the steps showed in Win32Compile web.

Any suggestion?

Thanks!

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 22 Oct 2014 17:19
by jerome_px
I have the same issue ...

Maybe someone have an idea, or a script to avoid this ?

thanks !

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 22 Oct 2014 18:36
by Jean-Baptiste Kempf
--disable-x265

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 22 Oct 2014 20:53
by jerome_px
well I'm getting new issues ...
I don't understand how you compile vlc for windows every night ...

thanks you anyway !

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 10 May 2015 09:57
by albert_wang
I follow https://wiki.videolan.org/Win32Compile/ instructions to do the compile, but failed in the same issue. I use Ubuntu140.04 to comile for windows 32bit VLC 2.2.1. Can anyone help ?

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 08 Jul 2015 23:33
by jrum
HI got the same error and it is related to mingw-w64: see https://bugs.debian.org/cgi-bin/bugrepo ... bug=755448
Solution is to use Ubuntu 15.04 there the problem is solved. you need package 3.2.0 of mingw-w64.
Hereby the match between the version of ubuntu and http://mingw-w64.org/doku.php/download.

My environment host VM is windows 8 machine and using vmware. Installed guest VM Ubuntu 15.04 desktop (ubuntu-15.04-desktop-i386.iso).
Then followed the page https://wiki.videolan.org/Win32Compile/. It complained one about 7z not being installed : sudo apt-get install p7zip-full.
Target make package-win32 made install package and could be installed on my host machine.
Hope this helps!

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 02 Sep 2016 07:10
by KimGwanyoung
--disable-x265
Hi,

I get the same issue while compile the vlc-2.2.4 with vlc-contrib-i686-w64-mingw32-20160121.tar.bz2.
If I configure --disable-x264 library, I get other error.
/home/jb/vlc-2.2/contrib/mingw/gnutls/lib/verify-tofu.c254: more undefined references to 'strtok_r' follow.
The strtok_r function is called in libgnutls.a

Could you help me?

Regards,
Gwanyoung Kim.

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 28 Sep 2016 23:00
by Jean-Baptiste Kempf
You need to update mingw

Re: Win32Compile in Ubuntu14 (undefine reference to strtok)

Posted: 24 Jan 2017 18:11
by AlexSt
I've done this on Ubuntu 14
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools
It tells that my mingw is up to date. I still get this "strtok_r" error. I get the same problem with mingw build on Windows 7.