From mint-bounce@lists.fishpool.fi  Wed May 26 04:10:32 2010
To: <ole@monochrom.net>
Subject: Re: [MiNT] Gcc 4.4.3 Linking problems, libmath testcase attached...
MIME-Version: 1.0
Date: Wed, 26 May 2010 10:07:50 +0200
From: m0n0 <ole@monochrom.net>
Cc: <mint@lists.fishpool.fi>
Reply-To: ole@monochrom.net
In-Reply-To: <f67f4f48fe778cb7125905ed3d89385c-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJXlloAFdTMl5dRkEKXVJeRlo=-webmailer2@server07.webmailer.hosteurope.de>
References: <612f817344d98621f0cd0961cd413ccd-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJXlloAFdTMl5dRkEKXVxQRFg=-webmailer2@server07.webmailer.hosteurope.de> <AANLkTik7VvtftaLH1a9l4oU9WsxplcgN68_5OCMi5Ssk@mail.gmail.com> <b17f30c7a9be8bc89a0b87d3d8d45c8b-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJXlloAFdTMl5dRkEKXV1RRVk=-webmailer2@server07.webmailer.hosteurope.de> <f67f4f48fe778cb7125905ed3d89385c-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJXlloAFdTMl5dRkEKXVJeRlo=-webmailer2@server07.webmailer.hosteurope.de>
Message-ID: <eecc00d56e958e712b6a629aa5dd5406-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYAXUF0BDpUX1hbSUMDXV1Z-webmailer2@server05.webmailer.hosteurope.de>
X-Sender: ole@monochrom.net
User-Agent: Host Europe Webmailer/2.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
X-HE-Access: Yes
X-bounce-key: webpack.hosteurope.de;ole@monochrom.net;1274861305;c6046a29;
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: ole@monochrom.net
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>


I created a small test for this, currently I'm linking with Vincents
cygwin port, yesterday I was compiling with the native gcc-4.4.3. So please
consider that...

My test:
#include <stdio.h>
#include <math.h>

int main()
{
	float f;
	double d;
	int i;
	printf("test%d: %d\n", 1, ceilf(f));
	printf("test%d: %d\n", 2, ceilf(d));
	printf("test%d: %d\n", 3, ceilf(i));
}


Cygwin Output:
$ m68k-atari-mint-gcc.exe testm.c -o testm.prg -lm --std=c99
testm.c: In function 'main':
testm.c:9:2: warning: implicit declaration of function 'ceilf'
testm.c:9:28: warning: incompatible implicit declaration of built-in
function 'c
eilf'
/tmp/cciSQb71.o:/tmp/cciSQb71.o:(.text+0x1c): undefined reference to
`_ceilf'
/tmp/cciSQb71.o:/tmp/cciSQb71.o:(.text+0x58): undefined reference to
`_ceilf'
/tmp/cciSQb71.o:/tmp/cciSQb71.o:(.text+0x90): undefined reference to
`_ceilf'
collect2: ld returned 1 exit status

What Is going wrong here? 

This workaround seems to work: 
#define ceilf(x) ceil(x)

greets,
ole

Am Mittwoch, den 26.05.2010, 01:06 +0200 schrieb "Ole Loots"
<ole@monochrom.net>:
> Am Mi, 26.05.2010, 00:50 schrieb Ole Loots:
> 
>> Am Mi, 26.05.2010, 00:40 schrieb Miro Kropacek:
>>>> /d/root/netsurf/netsurf/render/html_redraw.c:1877: undefined
reference
>>>> to
>>>> `_ceilf'
>>> [..]
>>>> undefined reference to `_log10'
>>> [..]
>>>>
/d/usr/bin/../lib/gcc/m68k-atari-mint/4.4.3/../../../libxml2.a(xpath.o)(.text+0x85d4):
>>>> undefined reference to `_pow'
>>
> 
> I passed /usr/lib/libm.a directly to the cc invoke ( cc foobar.o
> /usr/lib/libm.a) and then it (ld) only throws errors on _ceilf...


