-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Apothecary: FreeImage 3.16.0 #3143
Conversation
typedef uint32_t DWORD; | ||
typedef int32_t LONG; | ||
typedef int64_t INT64; | ||
typedef uint64_t UINT64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bakercp - we did this #define approach ( combined with #undefine at the end of the file ) for a while now because MS complains about types being defined already. Its always been a bit of a dirty hack, but it was the only way to get it to compile without errors. did you have a fix for this issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied it directly from their source folder -- I didn't realize it was an oF mod. I'm compiling it on win right now (as I type this), so I'll test it and update if the errors come up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested on both vs2012 and win_cb with the attached static libs / dylibs and updated 3.16.0 header and both linked and compiled fine without any header mods -- so, for the moment, I think I'll leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to leave it as-is if it works - patched library files will be a pain to keep up-to-date (as this example shows). If we have to patch them, we should do it in apothecary so at least we can keep track of the changes automatically, and preserve patches across lib updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed - hopefully it doesn't crop up!
just wanted to make a note of it as it was a common part of the process of updating free image.
we could definitely add it as a patch step to apothecary if needed.
@ofTheo @arturoc Can either of you explain why there are static FreeImage libs in the $OF_ROOT/libs/Freeimage/vs|win_cb dirs and also FreeImage.dll dynamic libs in the export folder? The programs won't run without the dlls, but I'm just wondering why we have both ... I'm quite inexperienced on the windows side (but learning quickly :)) |
some libraries just do that, if you compile it and don't get a dll then it's fine to remove it from export. there must be a way to avoid it but last time i compiled it i couldn't find it |
@bakercp if FreeImage is build dynamically it needs a stub lib and a dll. the stub lib is a super light lib which tells the compiler to search for those methods on runtime. I don't know why we have FreeImage as dynamic on windows, it would be great if we could build it statically! |
@ofTheo -- ok that makes sense. I'm fairly confident the current FreeImage.lib in this PR is a full static lib (which means we could drop the dll from exports) -- but I'll do a bit more research. |
@bakercp want me to have a look at compiling the iOS FreeImage? |
For sure :) |
Just noticed we should be running Current oF libs up there < 0.8+ have already been stripped of these symbols. |
…6, x86_64) - Custom makefile for iOS created to put power of target arch into the Apothecary script and bypass errors - In line hot fixes for arm64 for some of the sub-libraries of FreeImage.
Apothecary: FreeImage iOS Formula + libs
Okay I found some major issues with LibJXR for OSX / iOS. Basically without modification the C source files link and predeclare functions that are not within the bounds of the object that is compiled, so predeclaring FreeImage should not have included this new lib without testing it! Bad #freeimage ;D |
Interesting thanks for sticking with it ... |
It all became apparent when compiling all the libs together.. I think we are still missing the formula for |
Are you sure are we still using |
Ah yes! Awesome, better if it is removed :) I'll try that out. On 4 September 2014 18:21, Tim Gfrerer notifications@github.com wrote:
|
…ks into apothecary-FreeImage
is it okay to update the list with iOS as done? |
Not finished yet, 90% there. Still have some symbol link errors when On 15 September 2014 23:54, Theodore Watson notifications@github.com
|
…ks into apothecary-FreeImage
For OSX + Poco Issues. I just noticed IE:
http://stackoverflow.com/questions/10300114/should-i-use-ansi-or-explicit-std-as-compiler-flags |
@danoli3 Yeah, that was required (at least at the time) to get it to compile. More here: http://sourceforge.net/p/freeimage/discussion/36111/thread/a9cc87b6/ And other places as well .. |
I wonder if So if FreeImage was calling say the libpng code from Poco's code, and the FreeImage code was libstd++ and the Poco code calling it was libc++, would definitely explain the error. Good reference for this issue: |
- Fixes symbolic linking issues by patching FreeImage (patch sent to FreeImage repo as well). https://github.com/danoli3/FreeImage - Patch danoli3/FreeImage@f069aaefc6724fa9c8065a47000b 31212024e9d6.patch - Fixes broken make file from FreeImage 3.16.0 - Fixes broken clean script from FreeImage 3.16.0 - Architectures arm64, armv7, armv7s, i386, x86_64
- Tested and working
Okay finally fixed FreeImage for iOS!! Added Pull to @bakercp fork bakercp#15 I've already tested all the libs together now and it's working :D!! |
Apothecary: FreeImage 3.16.0 Working for iOS/OSX
- Fixes linking errors to ARM achitectures due to ARM Neon
- With ARM Neon Fix
Apothecary: FreeImage 3.16.0 Working for iOS ARM architectures
Apothecary free image
…ks into apothecary-FreeImage
@danoli3 -- can we merge this? It's looking OK from here. |
Yeah this was working great last I tested. Still have to remove iOS armv7s from script and rebuild On Tuesday, November 25, 2014, Christopher Baker notifications@github.com
|
Yeah, if you want to cherry-pick and fix the script for armv7s, that then we can make a clean build like openssl and poco and hopefully get this all merged in the next day or two ... |
I think we can close this now right? now that #3446 has been merged? |
Going to close this, as it looks like #3446 has covered it |
Update apothecary build scripts and header / static libs for FreeImage 3.16 (the latest tagged version).
Static libs for architectures included:
The following platforms use pkg-config system libs
Notes:
FreeImage.h
I had to convert the line endings to LF. Apparently it is shipped with CRLF.