Hi guys, i need to compile the latest DCRaw 9.10 but the new version require the file jasper.h to put it in SDK installation.
After a quick look i understand that this file is a part of ImageMagick package so i've searched it on our OS4 port (both bin and src archive) but i didn't found it :-/
I think it may be a part of a ImageMagick SDK but there is no ImageMagick SDK out there, any tips please ?
It seems, that you need libjasper.a also. And then add to the linker line (the last line) -ljasper. Dunno if there is any such file around, though, you might need to compile it yourself.
What does it say when you try to use -DNO_JASPER ???
5.Work:SDK/Progetti/DCRaw> make ppc-amigaos-gcc -mcrt=newlib -O2 -g -Wall -DNO_JASPER -c -o dcraw.o dcraw.c dcraw.c: In function 'parse_makernote': dcraw.c:4531: warning: pointer targets in passing argument 1 of 'my_memmem' differ in signedness dcraw.c: In function 'main': dcraw.c:8824: error: 'VERSION' undeclared (first use in this function) dcraw.c:8824: error: (Each undeclared identifier is reported only once dcraw.c:8824: error: for each function it appears in.) make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/DCRaw>
Edit: ops didn't read carefully (3 o night sorry), ok i will search if somethings similar is availible, if not i don't know how to procede with the port ,,
@samo79 You need more than jasper.h to use jasper. The include file just tells GCC what functions are contained in libjasper. You actually need the library. Probably you need to compile it from the sources included in the archive you found and include "-ljasper" in your dcraw compile. Unfortunately, you may need to cross-compile it from Linux. I've given up on a lot of programs because they need tools that we apparently don't have in the OS4 SDK. Maybe I'm wrong but I know how it's done if it is possible.
EDIT: Someone beat me to the punch with the above info. I don't think libjasper.a compiled for Linux will do you any good. You need it to be compiled for OS4.
Ah ah, yep at the moment i've included a series of files (not only jasper.h) more or less 20 files .h taked directly from the main archive i post above, then i just copy the entire folder in proper path in my SDK
We will see if i need to make a library or other more-complicated procedures, if so of course i can't be able to do it alone (maybe salass can help me again but i prefer to not ask him in August!)
Now i'm searching if i can be able to found somewhere this libjasper.a, (i know as you say that maybe it don't work but i'll try ..)
5.Work:SDK/Progetti/DCRaw> make ppc-amigaos-gcc -mcrt=newlib -O2 -g -Wall -DNO_JASPER -c -o dcraw.o dcraw.c dcraw.c: In function 'parse_makernote': dcraw.c:4531: warning: pointer targets in passing argument 1 of 'my_memmem' differ in signedness dcraw.c: In function 'main': dcraw.c:8824: error: 'VERSION' undeclared (first use in this function) dcraw.c:8824: error: (Each undeclared identifier is reported only once dcraw.c:8824: error: for each function it appears in.) make: *** [dcraw.o] Error 1 5.Work:SDK/Progetti/DCRaw>
Looks like there is something wrong with the dcraw.c file your using as on line 8824 it should use the macro DCRAW_VERSION (not VERSION) that is defined near the top of the top of the file as (line 26): Quote:
#define DCRAW_VERSION "9.10"
This is what this line (8824) should contain: Quote:
Yes exactly and this was my fault as i copied in this new dcraw.c the block of code used in my old DCRaw version to be able to centered the text and add me and you as mantainers.
Fixing this now remain all thus undefined reference, is there any method to skip them during compile or we need real coding solutions ?
Quote:
3.Work:SDK/Progetti/DCRaw> make ppc-amigaos-gcc -mcrt=newlib -O2 -g -Wall -c -o dcraw.o dcraw.c dcraw.c: In function 'parse_makernote': dcraw.c:4531: warning: pointer targets in passing argument 1 of 'my_memmem' differ in signedness ppc-amigaos-gcc -mcrt=newlib -O2 -g -Wall -c -o swab.o swab.c ppc-amigaos-gcc -mcrt=newlib -use-dynld -o dcraw.debug dcraw.o swab.o -llcms -ljpeg -lm dcraw.o: In function `redcine_load_raw': /Work/SDK/Progetti/DCRaw/dcraw.c:2669: undefined reference to `jas_init' /Work/SDK/Progetti/DCRaw/dcraw.c:2670: undefined reference to `jas_stream_fopen' /Work/SDK/Progetti/DCRaw/dcraw.c:2671: undefined reference to `jas_stream_seek' /Work/SDK/Progetti/DCRaw/dcraw.c:2672: undefined reference to `jas_image_decode' /Work/SDK/Progetti/DCRaw/dcraw.c:2674: undefined reference to `jas_matrix_create' /Work/SDK/Progetti/DCRaw/dcraw.c:2679: undefined reference to `jas_image_readcmpt' /Work/SDK/Progetti/DCRaw/dcraw.c:2705: undefined reference to `jas_matrix_destroy' /Work/SDK/Progetti/DCRaw/dcraw.c:2706: undefined reference to `jas_image_destroy' /Work/SDK/Progetti/DCRaw/dcraw.c:2707: undefined reference to `jas_stream_close' make: *** [dcraw.debug] Error 1 3.Work:SDK/Progetti/DCRaw>
@Templario
Eh but this is only a quick and "easy" compile, my target at this stage is just learning and why not release somethings if easy
@samo79 Just in case: you have in makefile "-use-dynld", so, together with all your "-lxxxx", it will make a version which will use all those .so. Maybe not big deal of course, but better to make it static (remove -use-dynld, and put instead -static in makefile).
Related to undef references on linking stage, you need to do as alfkil say: or trying to add -DNO_JASPER, or add -ljasper (somethere you should have libjasper.a , in your sdk, or in working directory, so -ljasper will works).
Fixing this now remain all thus undefined reference, is there any method to skip them during compile or we need real coding solutions ?
You need libjasper. You can build it from the archive you got the header files from, however it need autoconf/automake run over it so, well, good luck with that.
Better to find another copy of the source where somebody has bothered to run autoconf over it already.
As said before just use -DNO_JASPER to get rid of the undefined references. It won't support as many formats then but at least it won't be any worse than any previous dcraw versions for OS4.
If you want I can give crosscompiling libjasper a try for you some time later.
Just in case: you have in makefile "-use-dynld", so, together with all your "-lxxxx", it will make a version which will use all those .so. Maybe not big deal of course, but better to make it static (remove -use-dynld, and put instead -static in makefile).
Yes in my makefile i have "-use-dynld" in LINK but DCRaw doesn't create any .so, it just create a single and ready-to-be-usable bin so i think i don't need to make a static version
Quote:
Related to undef references on linking stage, you need to do as alfkil say: or trying to add -DNO_JASPER, or add -ljasper (somethere you should have libjasper.a , in your sdk, or in working directory, so -ljasper will works).
I didn't found on the net this libjasper.a, or better i found it inside a compressed Linux file, but i can't be able to extract it on AmigaOS, maybe later i will search if i can found this file alone :-/
@ChrisY
Quote:
You need libjasper. You can build it from the archive you got the header files from, however it need autoconf/automake run over it so, well, good luck with that.
Better to find another copy of the source where somebody has bothered to run autoconf over it already.
Well for now i just compile it as is adding -DNO_JASPER so finally i bypass all that undefined reference, at the end we miss somethings related to the JPEG2000 support i think but for now is better than nothing
@salass00 Quote:
If you want I can give crosscompiling libjasper a try for you some time later.
Yes please, it will help me a lot !
Now i'm going to create the final archive, just a few minutes and all of you can try it
Yes in my makefile i have "-use-dynld" in LINK but DCRaw doesn't create any .so, it just create a single and ready-to-be-usable bin so i think i don't need to make a static version
And it should't create any .so, it will use .so (which you can have in your setup already, but others are not). You can check by "readelf -d your_binary" later what kind of .so and how many of them your binary will use. I.e. -dynld point to use .sobjest, but not creates them. For example you have in your makefile:
-llcms -ljpeg -lm
So, if you will use it together with -use-dynld, and your SDK have libcms.so and libjpeg.so (and i assume you have second one for sure), then, your binary will refers at least on the 3 sobjes:
- libc.so - libz.so - libjpeg.so
(and maybe some others)
Quote:
I didn't found on the net this libjasper.a, or better i found it inside a compressed Linux file, but i can't be able to extract it on AmigaOS, maybe later i will search if i can found this file alone :-/
Any library.a , its platform specific, you can't use any other library from any unix/linux as some kind of "header", you should compile it yourself, or found only amigaos4 version if it already done by anyone.
And it should't create any .so, it will use .so. You can check by "readelf -d your_binary" later what kind of .so and how many your binary will use (i.e. -dynld point to use .sobjest, but not creates them).
Any library.a , its platform specific, you can't you any other library from any unix/linux as some kind of "header", you should compile it yourself, or found only amigaos4 version if it already done by anyone.
Yep i hardly suspect, just wanted to try it out
DCRaw 9.10 is now on OS4Depot
Edited by samo79 on 2011/8/1 1:45:07 Edited by samo79 on 2011/8/1 1:51:53
Yes for sure, a GUI would be welcome, altrough it's quite usable even on shell
@salass00
Maybe after libjasper do you like to create a simple GUI for us ? Maybe an external one so if we need to update DCRaw we doesn't need to compile all "Program+GUI" but only dcraw.c as always.
Don't know which is the best solution for a developer prospective ...
But i can be the future maintainer having somethings "ready-to-compile" like my other collaborations with James Jacobs in AmiArcadia and other OS4 projects