English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 July 2016, 10:52   #1
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Instructions for building QEMU plugins (x86 and x64) from source?

Edit: I now know how to build the plugins and later in the thread both 32 bit and 64 bit builds are provided. They are much smaller than the official versions too.

I'd like to build the QEMU plugins from the latest sources for testing. Are there good instructions to do so on Windows anywhere?

Last edited by headkase; 07 July 2016 at 01:52.
headkase is offline  
AdSense AdSense  
Old 04 July 2016, 11:31   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
I use Fedora (it comes with all required static mingw64 libraries, most other distributions do not) linux vm to crosscompile it. Mingw64 for Windows probably also works but configuring it and finding/compiling all required depencies can be quite painful..
Toni Wilen is online now  
Old 04 July 2016, 11:50   #3
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Ok, thank you Toni. I'll look into using Cygwin for a Windows build. Later on today when I have some free time.

By the way, which version of QEMU is used right now for the WinUAE binaries?

Thanks,

Bill.
headkase is offline  
Old 04 July 2016, 12:01   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
I think you need msys, not cygwin to have working mingw64 environment. (I set it up once and it was too painful, linux vm is _much_ easier to setup)

Current is qemu-2.2-uae branch. (qemu 2.2). Later ones (2.5/2.6 not tested) were unstable and slower for some unknown reason.
Toni Wilen is online now  
Old 04 July 2016, 12:03   #5
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Ok, right on - thank you. The latest QEMU right now is 2.6.0 and you say it's not tested so later today that is the one I will attempt to build. And hopefully, if the stars align , everything will work out just peachy.
headkase is offline  
Old 04 July 2016, 13:10   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
I can compile it if you can create 2.6 qemu-uae merge
Toni Wilen is online now  
Old 04 July 2016, 13:53   #7
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Is qemu-uae merge a patch set? Where would I find it? Thanks.

(I just spent an hour fighting with Cygwin just to find out that the latest version no longer supports building QEMU and the previous version that does is no longer available).
headkase is offline  
Old 04 July 2016, 14:32   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
https://github.com/FrodeSolheim/qemu-uae
Toni Wilen is online now  
Old 04 July 2016, 14:45   #9
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,368
I build QEMU-UAE using MSYS2/mingw-w64. As Toni mentioned, QEMU-UAE is based on QEMU 2.2. There were some issues when trying to use an updated QEMU 2.3 (or was it 2.4?), so we went back to QEMU 2.2.

Even later versions of QEMU has some internal changes, which makes QEMU-UAE in its current state crash. There isn't any known benefit from upgrading to more recent QEMU version, so porting to a newer QEMU hasn't been a priority.

(Short version; unless you know what you are doing, upgrading from QEMU 2.2 to QEMU 2.6 core is a very difficult task).
FrodeSolheim is offline  
Old 04 July 2016, 18:50   #10
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
I'm trying to build the GitHub repo: https://github.com/FrodeSolheim/fs-uae-plugin-qemu-uae with MSYS2/mingw-w64 but it fails early in the compilation with ld failing to find "-lutil" - any hints on which package I'm missing for that? It is such a generic name that Google is no use.

Also, I suspect that out of the end of it that I'll end up with a Linux .so file. Is there an option to choose to compile a Windows .dll file?

The entire point of it is this thread:

http://eab.abime.net/showpost.php?p=...2&postcount=13

Where BPPC runs poorly when I have to use a 603. That's all I'm looking for, that specific use case where hopefully it will improve the performance.
headkase is offline  
Old 04 July 2016, 19:29   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
configure --cross-prefix=<mingw64 32-bit or 64-bit gcc> --static

(--static not required but no normal Windows user has required DLLs)
Toni Wilen is online now  
Old 04 July 2016, 19:45   #12
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,368
@headkase:

Use this one:
https://github.com/FrodeSolheim/qemu-uae

and run:
Code:
./bootstrap
./configure
make
You'll end up with a .dll file when building on Windows, and an .so file for other platforms.
FrodeSolheim is offline  
Old 05 July 2016, 01:13   #13
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
How do I properly configure the source so that:
https://github.com/FrodeSolheim/qemu...r/include/qemu
log.h from that directory is properly found? Because right now compilation fails to find it. And I see in a comment that someone else has had the same issue.

I also installed Fedora and am doing a cross-compile to Windows.
headkase is offline  
Old 05 July 2016, 02:09   #14
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
By the way Toni, I obviously have comprehension problems. I missed where you said "VM." My solution was to get an old crap PC that was literally under a desk to put your feet on and install Fedora 24 on it bare-metal.
headkase is offline  
Old 05 July 2016, 02:24   #15
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Don't judge me, I did bad things to the compiler to get this .dll Unfortunately no improvement with QEMU 2.4 and Blizzard PPC emulation. So, now I'm going to go rebuild 2.2 as I see there have been various commits.
Attached Files
File Type: 7z qemu-uae_x64.7z (1.59 MB, 18 views)
headkase is offline  
Old 05 July 2016, 03:39   #16
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Unfortunately because of this issue:

https://github.com/Alexpux/MINGW-packages/issues/988

https://github.com/FrodeSolheim/qemu-uae (latest 2.2 build)

Cannot be built with static libraries on Fedora cross build. I don't know which dependencies I need to copy over or how to go about it. So, a little advice would be appreciated.

Edit: Now that I figured out what the bleep I was doing, building the latest GIT of 2.2 also has the same performance issues. It's attached. I have a good build environment now, MSYS doesn't suffer from the Fedora bug, I used MSYS for this build, so any future versions of the source I will gladly build and test.
Attached Files
File Type: 7z qemu-uae_x64.7z (2.03 MB, 16 views)

Last edited by headkase; 05 July 2016 at 04:50.
headkase is offline  
Old 05 July 2016, 09:29   #17
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Quote:
Originally Posted by FrodeSolheim View Post
@headkase:

Use this one:
https://github.com/FrodeSolheim/qemu-uae

and run:
Code:
./bootstrap
./configure
make
You'll end up with a .dll file when building on Windows, and an .so file for other platforms.
This does not work.

The first file it will fail to find is "log.h" which is in /include/qemu/log.h but the source expects it in uae/log.h so you can't even supply an include path before make.

The original link I gave, the fs-uae one that then downloads qemu-uae does have the correct directory structure to then copy the files from WinUAE-Master to to then use the fs-uae make and it builds for some versions. However, this is a total hack so I'd be grateful if you gave detailed instruction on how to actually do it right.

Thank you.

Edit: It just totally dawned on me that I should clone WinUAE-Master and then clone qemu-uae within it, would that be the right approach?

Last edited by headkase; 05 July 2016 at 09:37.
headkase is offline  
Old 06 July 2016, 16:01   #18
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
After some updates on Fedora today cross-compilation is working again for QEMU-UAE. Attached is the latest master of qemu-uae, 2.2.0.0 build. Commit: 91cfe77. Fedora-built .dll files are significantly smaller, like one megabyte, than MSYS builds so the Fedora builds are definitely preferred.

Unless told otherwise, when there is a new commit to the QEMU-UAE GitHub repo then I will rebuild and attach in this thread. Remember, these aren't official builds, they will shoot your dog and such.
Attached Files
File Type: 7z qemu-uae_x64.7z (1.49 MB, 19 views)

Last edited by headkase; 06 July 2016 at 16:24.
headkase is offline  
Old 06 July 2016, 18:45   #19
headkase
Highly Contagious

headkase's Avatar
 
Join Date: Jun 2016
Location: Canada
Posts: 60
Quote:
Originally Posted by FrodeSolheim View Post
I build QEMU-UAE using MSYS2/mingw-w64. As Toni mentioned, QEMU-UAE is based on QEMU 2.2. There were some issues when trying to use an updated QEMU 2.3 (or was it 2.4?), so we went back to QEMU 2.2.

Even later versions of QEMU has some internal changes, which makes QEMU-UAE in its current state crash. There isn't any known benefit from upgrading to more recent QEMU version, so porting to a newer QEMU hasn't been a priority.

(Short version; unless you know what you are doing, upgrading from QEMU 2.2 to QEMU 2.6 core is a very difficult task).
I do not know what I'm doing, programming wise, but if there is any advice I'm willing to fail and fail until maybe I succeed. The target is a better 603e emulation core which hopefully addresses current issues with Blizzard PPC AmigaOS 4.1 FE emulation.
headkase is offline  
Old 06 July 2016, 18:49   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,560
Quote:
Originally Posted by headkase View Post
I do not know what I'm doing, programming wise, but if there is any advice I'm willing to fail and fail until maybe I succeed. The target is a better 603e emulation core which hopefully addresses current issues with Blizzard PPC AmigaOS 4.1 FE emulation.
If changing ppc_model really fixes the slowdown, it must be something in QEMU side (UAE does not care about ppc_model, it just passes it to QEMU).
Toni Wilen is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lightwave Plugins emufan request.Apps 272 13 September 2017 21:22
Building WinUAE from source strim support.WinUAE 3 26 June 2015 12:21
plugins for octamed systmcrsh News 13 29 April 2011 12:37
REQ: Deliplayer 2 plugins wlcina request.Other 3 24 April 2011 08:28
ActiveX plugins - Harass Microsoft RCK Amiga scene 19 04 October 2001 19:12

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:01.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.22279 seconds with 12 queries