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

error: use of undeclared identifier 'expandBinaryPower2Low' #45

Closed
ryandesign opened this issue Apr 4, 2014 · 6 comments
Closed

error: use of undeclared identifier 'expandBinaryPower2Low' #45

ryandesign opened this issue Apr 4, 2014 · 6 comments

Comments

@ryandesign
Copy link

jbig2enc 0.28 does not build with leptonica 1.70:

jbig2.cc:136:3: error: use of undeclared identifier 'expandBinaryPower2Low'
  expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
  ^
1 error generated.

This was reported to the MacPorts project here: https://trac.macports.org/ticket/43185

@DingoDog
Copy link

DingoDog commented Apr 5, 2014

for your information, I was able to build from sources jbig2enc with leptonica 1.70 without pains on a professional, stable, secure OS (i.e. Linux)

so, you need to try to build jbig2enc with previous leptonica libs releases (you have no benefits from build jbig2enc with newer leptonica), to verify if your compiling environment has problems with newer leptonica, because IT is YOUR COMPILING ENVIRONMENT AT 100% causing problems, since on Linux jbig2enc builds fine even with latest leptonica.

@ryandesign
Copy link
Author

I have no doubt that my compiling environment differs from yours, but that does not make mine (or yours) faulty. :)

I have double-checked. jbig2enc 0.28 is able to build with leptonica 1.69, but with leptonica 1.70, the error is:

error: use of undeclared identifier 'expandBinaryPower2Low'

expandBinaryPower2Low is defined in leptonica 1.69 in the file src/binexpandlow.c. In leptonica 1.70, that file has been removed. The leptonica 1.70 version-notes.html state that this file was removed, but they don't say why.

So I do not think it is possible that you can build jbig2enc 0.28 with leptonica 1.70 on any OS and would ask you to re-check that on your system.

@zdenop
Copy link
Contributor

zdenop commented Apr 6, 2014

I can confirm that expandBinaryPower2Low is not present in leptonica-1.70 and there we can not build jbig2enc. IMO quick solution is to modified relevant part of jbig2.cc[1] this way:
PIX pixd = pixExpandBinary(pixd4, 4);
/
PIX pixd = pixCreate(piximg->w, piximg->h, 1);
pixCopyResolution(pixd, piximg);
*/
if (verbose) pixInfo(pixd, "mask image: ");
/
expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
pixd4->data, pixd4->w, pixd4->h, pixd4->wpl, 4);
*/

[1] https://github.com/agl/jbig2enc/blob/master/src/jbig2.cc#L132

@zdenop
Copy link
Contributor

zdenop commented Apr 7, 2014

@ryandesign this issue should be fixed in current code. Please check it and if it works for you please close the issue.

@ryandesign
Copy link
Author

Works for me! Thanks.

@jlgrall
Copy link

jlgrall commented Apr 8, 2014

@zdenop: thanks.

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

4 participants