[Fixed] SVN2639 Unable to compile on Windows

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
darkassassin
Posts: 7
Joined: Mon Jun 29, 2009 6:52 pm

[Fixed] SVN2639 Unable to compile on Windows

Post by darkassassin »

For the past day or so, I've been looking into compiling Handbrake from the latest SVN. However, whenever I attempted to build it, it would always fail after trying to compile libhb, on file ports.c, line 274:

Code: Select all

../libhb/ports.c: In function 'hb_thread_to_integer':
../libhb/ports.c:274: error: request for member 'p' in something not a structure or union
make: *** [libhb/ports.o] Error 1
time end: Mon Jun 29 11:14:11 2009
duration: 13 minutes, 44 seconds (824.06s)
result: FAILURE (code 2)
This change was made in SVN 2620.

The code it is referencing uses preprocessors to check the OS the code is running on, which means that an attempt to compile with this revision on any system other than Windows would succeed, or at least not fail due to this file. This is confirmed in this IRC log in #handbrake-dev, on a line around [05:49], where KonaB1lend says that it builds cleanly on Linux.

Taking out the ".p" from the end of line 274 allows a successful compilation on Windows. I've tested this on both Windows by taking out the ".p," and by adding it onto line 278 and attempting to compile on a Linux VM, where it failed compilation as well with the same error. The resulting CLI from this SVN after the code is taken out can create fully working encodes, and I've encoded two videos using this SVN.

If anyone could confirm my findings, that would be great.

Thanks, darkassassin.
SideShowBob
Posts: 29
Joined: Tue Dec 30, 2008 3:08 am

Re: SVN2639 Unable to compile on Windows

Post by SideShowBob »

I can confirm that as of SVN2652, built last night.

I'm on Vista x64, building using Cygwin. Haven't tested using mingw, but will once I get it set up.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5723
Joined: Sat Feb 09, 2008 7:21 pm

Re: SVN2639 Unable to compile on Windows

Post by JohnAStebbins »

svn 2620 commit was made to fix a bug with the mingw port. I guess nobody retested with cygwin. This patch might fix it.
I don't have cygwin to test it with, so no guarantee.
http://handbrake.fr/pastebin/pastebin.php?show=704
darkassassin
Posts: 7
Joined: Mon Jun 29, 2009 6:52 pm

Re: SVN2639 Unable to compile on Windows

Post by darkassassin »

I apologize, I forgot to mention that I was using Cygwin for building HandBrake.

I just tested a build of SVN2658 (the latest as of this writing), and it indeed compiles successfully! Thank you very much for rectifying the issue, it is much appreciated :D.

Thanks, darkassassin
Post Reply