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

decide whether or not we care about ABI compat #21

Closed
bdaehlie opened this issue Mar 11, 2014 · 9 comments
Closed

decide whether or not we care about ABI compat #21

bdaehlie opened this issue Mar 11, 2014 · 9 comments
Assignees
Labels
Milestone

Comments

@bdaehlie
Copy link
Member

@bdaehlie bdaehlie commented Mar 11, 2014

In mozjpeg 1.0 we broke ABI compatibility with the new configuration options. At the same time we've talked about trying to make it possible for our library to be a drop-in replacement for other libjpeg libraries. These are in conflict. We should either maintain ABI compatibility or give up on the idea that existing users might be able to, or should, use our library as a drop-in replacement.

I'm currently leaning towards the latter because most library users are better off sticking with libjpeg-turbo. This is because most users care about decoding and we aren't planning to invest in the decoder. Furthermore, the deployment context for our software, which is focused on the Web, will rarely involve mozjpeg being used in library form. Maintaining ABI compat is extra work we don't benefit much from, and it might give the wrong impression about replacing existing libjpeg usage with mozjpeg.

@kornelski
Copy link
Member

@kornelski kornelski commented Mar 11, 2014

I think mozjpeg as a replacement for system-wide libjpeg is an interesting option, e.g. I'd like to swap /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib in OS X to get Preview.app etc. to save JPEGs better (although it already has _Apple_IsOptionalFeatureAvailable symbol, so I'm not sure if that's feasible).

@ace-dent
Copy link

@ace-dent ace-dent commented Apr 7, 2014

The goals of this project, IMHO, make it unsuitable for common library use.
+1 for dropping ABI compatibility.

@fwenzel
Copy link
Member

@fwenzel fwenzel commented Apr 7, 2014

FWIW, an interested party could probably write a wrapper from the libjpeg API to mozjpeg to create a drop-in replacement, but I concur that this shouldn't be a requirement for this project, as it'll unnecessarily restrict the ability to apply more "daring" changes.

@fwenzel fwenzel added the question label Apr 7, 2014
@kornelski
Copy link
Member

@kornelski kornelski commented Apr 7, 2014

OK, sounds reasonable.

@dwbuiten
Copy link
Member

@dwbuiten dwbuiten commented Jul 8, 2014

As I noted in #63 (before I realize it was a dupe), if you guys choose the latter option, please allow some way for us downstream developers to differentiate between mozjpeg and vanilla jpeg headers... not providing one makes it really a pain in the butt to support mozjpeg a an option for downstream API users.

Aside: I do wonder why you'd choose IJG/jpeg-turbo to fork if the point wasn't to make a drop in replacement... it's API is... not the nicest.

Furthermore, the deployment context for our software, which is focused on the Web, will rarely involve mozjpeg being used in library form.

As someone who works on a fairly popular website (Vimeo), I would tend to disagree 😄.

EDIT: I forgot to mention a lot of people (I reckon perhaps the majority, but not us) of people use ImageMagick's convert utility, linked to libjpeg62 to generate JPEGs.

@kodabb
Copy link
Contributor

@kodabb kodabb commented Jul 8, 2014

@pornel be careful with that, all ImageIO libraries (libjpeg, libpng etc) functions are prefixed with cg_

@njdoyle
Copy link

@njdoyle njdoyle commented Jul 16, 2014

I would also like to echo @dwbuiten in saying that I am much more interested in this as a library (particularly with ImageMagick compatibility) than I am in using it as an isolated tool.

@bdaehlie bdaehlie added this to the v3.0 milestone Jul 31, 2014
@bdaehlie bdaehlie self-assigned this Jul 31, 2014
@bdaehlie
Copy link
Member Author

@bdaehlie bdaehlie commented Jul 31, 2014

I've been discussing this with people for a while now, I think we're going to aim for ABI compat with libjpeg-turbo in v3.0. DRC, the primarily developer of libjpeg-turbo, has sent me a proposal for ABI extensions. We'll publish a plan soon, hopefully.

This issue is about deciding whether or not we're going to care about ABI compat. I think we've decided "yes", so I'm going to close this out and file a bug on coming up with a plan an implementing it.

@kornelski
Copy link
Member

@kornelski kornelski commented Oct 21, 2014

I can't find the DRC's proposal for the ABI extensions. Could you point me to it/share it?

kornelski pushed a commit to kornelski/mozjpeg that referenced this issue Apr 27, 2016
At one time, it was possible to use CMake to build under Cygwin, but
that hasn't worked since 1.4.1 (due to the Huffman codec changes that
now require SIZEOF_SIZE_T to be defined for non-WIN32 platforms) and may
have even been broken before that.  Originally, we used the "date"
command under MSYS in order to obtain the default build number, but that
was rendered unnecessary by 5e3bb3e (v1.3 beta.)  9fe22da (1.4 beta)
further modified CMakeLists.txt so that the "date" command was only used
on Cygwin, but for unexplained reasons, that commit also applied the
(now vestigial) code to all non-WIN32 platforms.  This prevented
CMakeLists.txt from displaying an error if someone attempted to use the
CMake build system on Un*x platforms, and that may have been behind the
flurry of pull requests and issues-- including mozilla#21, mozilla#29, mozilla#37, mozilla#58, mozilla#73--
complaining that the CMake build system didn't work on Un*x platforms
(although it was not until mozilla#73 that this bug came to light.)

This commit removes all vestiges of Un*x support from the CMake build
system and makes it clear that CMake cannot be used to build
libjpeg-turbo on non-WIN32 platforms.  It is our position that CMake
will not be supported on non-WIN32 platforms until/unless the autotools
build system is removed, and this will not happen without broad support
from the community (including major O/S vendors.)  If you are in favor
of migrating the entire build system to CMake, then please make your
voice heard by commenting on mozilla#56.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants