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

JasPer uchar definition is gone #41

Closed
gagern opened this issue Nov 15, 2016 · 8 comments
Closed

JasPer uchar definition is gone #41

gagern opened this issue Nov 15, 2016 · 8 comments

Comments

@gagern
Copy link

gagern commented Nov 15, 2016

In response to jasper-software/jasper#72, JasPer no longer defines uchar but instead defines jas_uchar. Quoting @mdadams from there:

I hope that nobody was relying on the cruft that was in jas_config.h that actually should not have been there. If anyone was, their code will no longer compile.

Current DevIL won't compile against latest JasPer due to things like this cast.

@mdadams
Copy link

mdadams commented Nov 16, 2016

What version of JasPer are you using? Unless my eyes are playing tricks on me, there is no uchar on the line to which you are referring in the most recent version of JasPer on the master branch. As best I can tell, this issue must have been fixed a while ago.

Incidentally, I could not help but notice your comment saying that you are updating your code to work with MSVC++ 2015. I don't know if this would be of any help to you but I am trying to put together a MSBuild project file for JasPer so that it can be built with the AppVeyor CI platform in order to allow some automated testing for MSVC environments (which I cannot do on my own machine since I don't have MSVC on it). The problem that I am having is that I have no idea how to setup the appropriate project file(s) since I am using an autotools build. If you have any words of wisdom in this regard, they would be most welcome.

@bcampbell
Copy link
Contributor

just to confirm, I see the same issue when I compile against the latest jasPer release (1.900.28).

In file included from /usr/local/include/jasper/jasper.h:68:0,
                 from /home/ben/proj/DevIL/DevIL/src-IL/src/il_jp2.c:16:
/home/ben/proj/DevIL/DevIL/src-IL/src/il_jp2.c: In function ‘jas_stream_initbuf’:
/home/ben/proj/DevIL/DevIL/src-IL/src/il_jp2.c:462:32: error: ‘uchar’ undeclared (first use in this function)
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                                ^
/home/ben/proj/DevIL/DevIL/src-IL/src/il_jp2.c:462:32: note: each undeclared identifier is reported only once for each function it appears in
/home/ben/proj/DevIL/DevIL/src-IL/src/il_jp2.c:462:23: error: expected expression before ‘)’ token
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                       ^
src-IL/CMakeFiles/IL.dir/build.make:950: recipe for target 'src-IL/CMakeFiles/IL.dir/src/il_jp2.c.o' failed
make[2]: *** [src-IL/CMakeFiles/IL.dir/src/il_jp2.c.o] Error 1

The uchar definition is still available when I compile against jasPer 1.900.1 (the version packaged by whatever version of ubuntu I'm running. It's only 11 or so releases behind :- )

jas_uchar is obviously the right one to use, but I'm loathe to drop compatibility with the old jasPer version that ubuntu ships.
However, it's a moot point anyway - the offending DevIL code is on a code path which isn't even used, so I think it can easily be snipped. I'll have a go at it.

@bcampbell
Copy link
Contributor

OK, should now be sorted out in my cmake_cleanup branch. I'm intending that this stuff gets merged into the main repo, but until then feel free to cherrypick the commit: 8b5e3cb

@gagern
Copy link
Author

gagern commented Nov 16, 2016

@mdadams wrote:

What version of JasPer are you using?

JasPer 1.900.26, as per this Gentoo version bump.

Unless my eyes are playing tricks on me, there is no uchar on the line to which you are referring in the most recent version of JasPer on the master branch.

This is DevIL source code, not JasPer code.

@bcampbell wrote in 8b5e3cb:

the offending code in DevIL was never executed and could be removed.

That's always a good solution. 😄

Thanks for the quick fix! I'll inform Gentoo.

@mdadams
Copy link

mdadams commented Nov 16, 2016

@bcampbell and @gagern: If Ubuntu is a concern for you, then the best thing to do would be to put pressure on Ubuntu to upgrade from the very obsolete 1.900.1 version of JasPer (which is about 10 years old) to the latest version, which is currently 1.900.29. I submitted a bug request to Ubuntu a while ago asking them to upgrade the version of JasPer being used:
https://bugs.launchpad.net/ubuntu/+source/jasper/+bug/1639737
I would suggest, however, that you also put pressure on Ubuntu to upgrade the version of JasPer being used. JasPer 1.900.29 has many major bug fixes and some new features that are missing in 1.900.1 It would be much better for the users of your software on Ubuntu if they were using a newer version of JasPer..

@bcampbell
Copy link
Contributor

Thanks, @mdadams - I think the issue is further upstream, in Debian. I'm pretty sure that ubuntu is just relying on the debian packaging. The JasPer package in debian does seem to have a maintainer, but is still on 1.900.1. A bug report there might help move things along... I suspect it'd carry more weight coming from you, but I'm happy to submit one if you'd prefer.

@bcampbell
Copy link
Contributor

@gagern: keep in mind that my cmake_cleanup branch isn't (yet) merged into the official DevIL master branch, so it's probably not quite ready for distros to have at it ;-)
(and there are a couple of other things holding back a release - a new version number, for one!)

@mdadams
Copy link

mdadams commented Nov 18, 2016

@bcampbell I would appreciate very much if you could submit a bug report in Debian to request an upgrade to the latest version of JasPer (which is currently 1.900.29). You can point out that 1.900.1 is about 10 years old and the 1.900.29 (which is much more recent) has many bug fixes and some new features that are missing from 1.900.1.

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