Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
158 user(s) are online (136 user(s) are browsing Forums)

Members: 2
Guests: 156

amigait, beworld, more...

Headlines

 
  Register To Post  

DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
I'm trying to update the Fredrik's DCRaw port but i have a problem during compile, it asked for LCMS deps so i've installed LibLCMS putting all deps files in SDK:Local/#, then i try to compile it with a simple "make" command

But I have:

Quote:
Processo: Shell 5
5.AmigaOS4:> Work:SDK/Progetti/dcraw/
5.Work:SDK/Progetti/dcraw> make
gcc -mcrt=clib2 -O2 -c -o dcraw.o dcraw.c
dcraw.c:52:18: error: lcms.h: No such file or directory
dcraw.c: In function 'apply_profile':
dcraw.c:8097: error: 'cmsHPROFILE' undeclared (first use in this function)
dcraw.c:8097: error: (Each undeclared identifier is reported only once
dcraw.c:8097: error: for each function it appears in.)
dcraw.c:8097: error: expected ';' before 'hInProfile'
dcraw.c:8098: error: 'cmsHTRANSFORM' undeclared (first use in this function)
dcraw.c:8098: error: expected ';' before 'hTransform'
dcraw.c:8102: error: 'LCMS_ERROR_SHOW' undeclared (first use in this function)
dcraw.c:8104: error: 'hInProfile' undeclared (first use in this function)
dcraw.c:8116: error: 'hOutProfile' undeclared (first use in this function)
dcraw.c:8133: error: 'hTransform' undeclared (first use in this function)
dcraw.c:8133: error: 'TYPE_RGBA_16' undeclared (first use in this function)
dcraw.c:8134: error: 'INTENT_PERCEPTUAL' undeclared (first use in this function)
make: *** [dcraw.o] Error 1
5.Work:SDK/Progetti/dcraw>


What's wrong ?

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@samo79

Quote:

dcraw.c:52:18: error: lcms.h: No such file or directory

Mean that dcraw.c cant found lcms.h file (check if your SDK have it in local/newlib/includes or kind). If problem still will occurs, you can check in dcraw.c how that lcms.h are includes. It can be included like:
include "lcms.h" (" " there mean that compiler will try to found include in the current direcotry".
if it will:
include <lcms.h>
then < > say to compiler found a file in the SDK.
it also can be like:
include <some_path/lcms.h>
so, you maybe need to create that "some_path" in your sdk includes, and put lcms.h in it.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DCRaw 9.04 porting issue
Just can't stay away
Just can't stay away


See User information
@samo79

The lcms.h include file should be in either "SDK:local/common/include" or "SDK:local/newlib/include" assuming that you installed liblcms correctly.

Edit: change the -mcrt=clib2 in the Makefile to -mcrt=newlib if you want to use the latest newlib-only liblcms build

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@salass00

Yep, i'm a newbie i've installed those only in:

SDK:Local/newlib --> "lib" and "include"

For this they wasn't checked by the compiler (strange is that there were any installing guide into LibCMS archive that explain the correct paths, this is not so helpfull for a newbie!)

Aniway, as you say i've installed the include (lcms.h and icc34.h) also in:

SDK:local/common/include

But now i have:

Quote:
.Work:SDK/Progetti/dcraw> make
gcc -mcrt=clib2 -O2 -c -o dcraw.o dcraw.c
In file included from dcraw.c:52:
/SDK/local/common/include/lcms.h:179:23: error: memory.h: No such file or directory
In file included from dcraw.c:52:
/SDK/local/common/include/lcms.h:190: error: conflicting types for 'BYTE'
/SDK/include/include_h/exec/types.h:108: error: previous declaration of 'BYTE' was here
/SDK/local/common/include/lcms.h:191: error: conflicting types for 'WORD'
/SDK/include/include_h/exec/types.h:111: error: previous declaration of 'WORD' was here
make: *** [dcraw.o] Error 1
5.Work:SDK/Progetti/dcraw>


BTW thanks for your help

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@salass00

Quote:
Edit: change the -mcrt=clib2 in the Makefile to -mcrt=newlib if you want to use the latest newlib-only liblcms build


Ehm, shame on me, this change was pretty obvious

All goes better now except for a file missed (memory.h) where i can found it ?

Quote:
Processo: Shell 5
5.AmigaOS4:> Work:SDK/Progetti/dcraw/
5.Work:SDK/Progetti/dcraw> make
gcc -mcrt=newlib -O2 -c -o dcraw.o dcraw.c
In file included from dcraw.c:52:
/SDK/local/newlib/include/lcms.h:179:23: error: memory.h: No such file or directory
make: *** [dcraw.o] Error 1
5.Work:SDK/Progetti/dcraw>

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
I reply to myself, i've found memory.h and put it in common as well, logically a new problem happen

Quote:
5.Work:SDK/Progetti/dcraw> make
gcc -mcrt=newlib -O2 -c -o dcraw.o dcraw.c
In file included from dcraw.c:52:
/SDK/local/newlib/include/lcms.h:190: error: conflicting types for 'BYTE'
/SDK/include/include_h/exec/types.h:108: error: previous declaration of 'BYTE' was here
/SDK/local/newlib/include/lcms.h:191: error: conflicting types for 'WORD'
/SDK/include/include_h/exec/types.h:111: error: previous declaration of 'WORD' was here
make: *** [dcraw.o] Error 1
5.Work:SDK/Progetti/dcraw>


Conflicting BYTE, WORD ? ..

Go to top
Re: DCRaw 9.04 porting issue
Just can't stay away
Just can't stay away


See User information
@samo79

You don't need to have lcms.h in both SDK:local/common/include and SDK:local/newlib/include. To make a clib2 build of dcraw you need a clib2 build of liblcms too which the above archive doesn't contain. This is why I suggested switching to newlib above.

Regarding the problems above I've uploaded a fixed lcms.h file here:
http://www.a500.org/uploads/lcms.h

Spot Up probably uses a dummy memory.h include file. I've fixed it so it shouldn't need it now but if you run into this problem in the future you can create one simply by typing the following in Notepad and saving it as "SDK:local/common/include/memory.h":
Quote:

#include <string.h>

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@salass00

Quote:
You don't need to have lcms.h in both SDK:local/common/include and SDK:local/newlib/include. To make a clib2 build of dcraw you need a clib2 build of liblcms too which the above archive doesn't contain. This is why I suggested switching to newlib above.


You right, this was the cause of the conflicts above (BYTE and WORD)

Quote:
Regarding the problems above I've uploaded a fixed lcms.h file here:
http://www.a500.org/uploads/lcms.h


Thanks, i used this new lcms.h file now, it compile now but it break at some point creating a conflict with swab

Quote:
5.Work:SDK/Progetti/dcraw> make
gcc -mcrt=newlib -O2 -c -o dcraw.o dcraw.c
gcc -mcrt=newlib -O2 -c -o swab.o swab.c
swab.c:3: error: conflicting types for 'swab'
/SDK/newlib/include/sys/unistd.h:65: error: previous declaration of 'swab' was here
make: *** [swab.o] Error 1
5.Work:SDK/Progetti/dcraw>


BTW: eventually i will ask spot to include a clib version too

What's the difference between clib and newlib for final user or devs ?

Go to top
Re: DCRaw 9.04 porting issue
Just can't stay away
Just can't stay away


See User information
@samo79

That is because the swab prototype is defined slightly differently in newlib than in clib2.

Replace the swab code with this instead:
void swab (const void *from_pvoid *to_pssize_t nbytes) {
    const 
char *from from_p;
    
char *to to_p;
    
nbytes >>= 1;
    while (
nbytes--) {
        *
to++ = from[1];
        *
to++ = from[0];
        
from += 2;
    }
}

Go to top
Re: DCRaw 9.04 porting issue
Just can't stay away
Just can't stay away


See User information
@samo79

A slightly improved Makefile:
http://www.a500.org/uploads/Makefile

This should create a shared objects newlib build. It will also create both a debug binary (dcraw.debug) and a smaller, stripped binary (dcraw).

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@salass00

It works now

There is only a warning during compile but it's not a huge problem

Quote:
5.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:4450: 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
ppc-amigaos-strip -R.comment -o dcraw dcraw.debug
5.Work:SDK/Progetti/dcraw>


Before release we may doing some test, wait a bit for the archive

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information

Go to top
Re: DCRaw 9.04 porting issue
Just can't stay away
Just can't stay away


See User information
@salass00

correct, i was using a dummy. =)

Go to top
Re: DCRaw 9.04 porting issue
Home away from home
Home away from home


See User information
@spotUP

Spot/All, if possible test this new DCRaw, if all goes well we can upload it on OS4Depot

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project