Hi Esteban.

2014-03-11 4:17 GMT+01:00 Esteban Campostrini <[email protected]>:

> fdlibm as well as zlib are built and packaged before doing the build of
> libpng. The configuration phase ends with error after preforming the
> following checking:
>
> configure:12509: checking for memset
> configure:12509: /usr/local/cross/ia32/bin/i686-pc-linux-gnu-gcc -o
> conftest  -O3 -imacros
> /home/esteban/helenos/coastline/helenos/include/system_config.h
> -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32LE -finput-charset=UTF-8
> -ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wextra
> -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes -std=gnu99
> -Wwrite-strings -pipe -ggdb -D__LE__ -march=pentium -fno-omit-frame-pointer
> -I/home/esteban/helenos/coastline/helenos/include/posix
> -I/home/esteban/helenos/coastline/helenos/include/   conftest.c  >&5
> /usr/local/cross/ia32/lib/gcc/i686-pc-linux-gnu/4.8.1/../../../../i686-pc-linux-gnu/bin/ld:
> warning: cannot find entry symbol _start; defaulting to 080480a0
> /tmp/ccd5m53O.o: In function `main':
> /home/esteban/helenos/coastline/build/libpng/libpng-1.6.10/conftest.c:57:
> undefined reference to `memset'
> collect2: error: ld returned 1 exit status
> configure:12509: $? = 1
> configure: failed program was:
>
What I miss in the parameters are HelenOS libraries. If you look into
helenos/env.sh, in LDFLAGS you will notice linking with posixaslibc and
c4posix.

My guess is that LDFLAGS and CFLAGS are not used as one would expect. If
you look into other harbours, you will notice that most of the time, you
add the linker flags to CFLAGS, e.g.
CFLAGS="$HSCT_CFLAGS $HSCT_LDFLAGS_FOR_CC ..."



> Here is not including any library from the same package like the case for
> example of libgmp in which you solved it by
> patching it, I'm not quite I understand what is trying to do here, I mean
> it seems to look for memset in libc but the prototype that declares
> is intentionally different.
>
This is one of the bits of ./configure magic I never really understood.
IMHO the point of this is to check that memset() looks as expected (i.e.
the signature). However, the check is often built in such way that it
passes even if the function is not defined at all. I encountered this when
porting GCC where configure "found" fork() even if the function did not
exist at all.


Btw, I briefly looked at help from ./configure and maybe you would need to
specify CPPFLAGS as well. You may want to look to Python harbour for a hack
how to do that.

- Vojta



>
>
>  Anyway, I think you are making a good progress. I am glad you were able
>> to fix the problems with hsct.sh yourself and I believe that you are only
>> few details away from porting libpng :-).
>>
>
> Thanks! I hope so!
>
> Cheers,
> Esteban
>
>>
>> Cheers,
>> - Vojta
>>
>>
>> [1] https://github.com/vhotspur/coastline/blob/master/libgmp/HARBOUR#L42
>> [2] https://github.com/vhotspur/coastline/blob/master/gcc/HARBOUR#L90
>> [3] https://github.com/vhotspur/coastline/blob/master/libmpfr/HARBOUR#L48
>> [4] https://github.com/vhotspur/coastline/blob/master/zlib/HARBOUR#L57
>> [5] http://helenos.alisma.cz/coastline/matrix/
>> [6]
>> http://trac.helenos.org/browser/mainline/uspace/dist/src/c/demos/hello/build.gcc
>>
>>
>> _______________________________________________
>> HelenOS-devel mailing list
>> [email protected]
>> http://lists.modry.cz/listinfo/helenos-devel
>>
>>
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to