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

/usr/bin/wine: 40: exec: /usr/lib/wine-development/wine: Exec format error #4242

Closed
musm opened this issue Jun 28, 2019 · 9 comments
Closed

Comments

@musm
Copy link

musm commented Jun 28, 2019

Trying to cross-compile Julia on WSL I keep running into issues with wine. The build fails with
/usr/bin/wine: 40: exec: /usr/lib/wine-development/wine: Exec format error

@musm
Copy link
Author

musm commented Jun 28, 2019

Instruction. I wiped and installed WSL Ubuntu from Win store from scratch

git clone https://github.com/JuliaLang/julia.git
cd julia
echo override XC_HOST = x86_64-w64-mingw32 >> Make.user

sudo apt-get install wine-stable subversion cvs gcc wget p7zip-full winbind mingw-w64 gfortran-mingw-w64 build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config

make


/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
    FLISP src/julia_flisp.boot
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine-stable: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine-stable: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine-stable: 40: exec: /usr/lib/wine/wine: Exec format error
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: Exec format error
Makefile:200: recipe for target 'julia_flisp.boot' failed
make[1]: *** [julia_flisp.boot] Error 2
Makefile:43: recipe for target 'julia_flisp.boot.inc.phony' failed
make: *** [julia_flisp.boot.inc.phony] Error 2
make: *** Waiting for unfinished jobs....

@onomatopellan
Copy link

what file /usr/lib/wine/wine says?

@musm
Copy link
Author

musm commented Jun 28, 2019

mus@mus-laptop:~$ cat /usr/lib/wine/wine
 |4   D!      4   � �    (  � �   4   4  |4  | �   �  �   �   �   T�  T� |T� |�   �   �   �   �          |   |�  �  �   l�  l. |l. |�  �  �    �  �   t�  t. |t. |��  ��  �   �   �   h�  h� |h� |D   D   �   �   Ptd�  � |� |<   <   �   �   Qtd                    �   �   Rtdl�  l. |l. |�  �  �   �   /lib/ld-linux.so.2  �   �   �   GNU     �   �       �   �   � ��@�   �   (   BEj�   � Cֻ|:�K2bXqX�j�|oӹ���                           �   �          �   ~           �   �               6�          �   v�          �   _�          "   h           �   P�          �   !�          �   /�          �   ��  S           �   *               ��          �   =�          �   �          �   W�          �              �   n�        I�          �   (�          �              �              �   9                          �   �   |    � � �   0 |    �   |    � � �  � |�   � � �   |    � � �  �  @� |]   � � �  Y
 |�  � � �   0 |�   � �         |    � � �  � |�   � � �  � |    � �  libwine.so.1 _ITM_deregisterTMCloneTable __gmon_start__ _ITM_registerTMCloneTable wine_init_argv0_path wine_exec_wine_binary wine_dlsym wine_mmap_add_reserved_area wine_init wine_get_build_id libpthread.so.0 pthread_create pthread_join __errno_location libc.so.6 _IO_stdin_used exit puts getpid putenv getenv stderr setrlimit64 munmap fwrite fprintf __cxa_finalize syscall getrlimit64 strcmp __libc_start_mai __libc_csu_fini _edata __data_start __libc_csu_init _end _fp_hw __bss_start wine_main_preload_info GLIBC_2.1 GLIBC_2.0 GLIBC_2.1.3 GLIBC_2.2 WINE_1.0 $ORIGIN/../i386-linux-gnu/wine:/usr/lib/i386-linux-gnu/wine    � � �   � � � � � � � � �    ��      � � �   �       '+�  � (�      l.    p.    /    �0    / |��  / |��  / |�  / |��  / |��  / |�  / |�  / |�  / | /   / |   / |
cat: write error: Input/output error

@onomatopellan
Copy link

That looks like a 32 bit binary. WSL1 only supports 64bit binaries.

Full discussion here: #2468

@musm
Copy link
Author

musm commented Jun 28, 2019

strange my winver says 1903 so should be wsl2, no?

@benhillis
Copy link
Member

@musm - It looks like you download the 32 bit version of wine.

@onomatopellan
Copy link

https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

Please note that you'll need to be running Windows 10 build 18917 or higher to use WSL 2

1903 is build 18362. You will need an insider fast build in order to use WSL2.

@musm
Copy link
Author

musm commented Jun 28, 2019

mus@mus-laptop:~/julia$ sudo apt install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine is a virtual package provided by:
  winehq-staging 4.11~bionic
  winehq-stable 4.0.1~bionic
  winehq-devel 4.11~bionic
  wine-development 3.6-1
You should explicitly select one to install.

E: Package 'wine' has no installation candidate

I removed the 32 bit version still I get errors

mus@mus-laptop:~/julia$ make
/usr/bin/wine: 1: /usr/bin/wine: Syntax error: ")" unexpected
    PERL base/pcre_h.jl
    PERL base/errno_h.jl
/bin/sh: 1: wine: Exec format error
    PERL base/build_h.jl.phony
    PERL base/file_constants.jl
    PERL base/uv_constants.jl
    PERL base/version_git.jl.phony
/usr/bin/wine: 1: /usr/bin/wine: Syntax error: ")" unexpected
/usr/bin/wine: 1: /usr/bin/wine: Syntax error: ")" unexpected
    FLISP src/julia_flisp.boot
/usr/bin/winepath: 46: exec: /usr/bin/wine: Exec format error
/usr/bin/winepath: 46: exec: /usr/bin/wine: Exec format error
/usr/bin/winepath: 46: exec: /usr/bin/wine: Exec format error
/bin/sh: 1: wine: Exec format error
Makefile:200: recipe for target 'julia_flisp.boot' failed
make[1]: *** [julia_flisp.boot] Error 2
Makefile:43: recipe for target 'julia_flisp.boot.inc.phony' failed
make: *** [julia_flisp.boot.inc.phony] Error 2

@onomatopellan
Copy link

onomatopellan commented Jun 28, 2019

It looks like Julia 64bit toolchain needs 32bit support too so you will need WSL2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants