[issue1710] gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division

David Shao (via DragonFly issue tracker) sinknull at leaf.dragonflybsd.org
Tue Mar 30 09:23:18 PDT 2010


New submission from David Shao <davshao at gmail.com>:

pkgsrc gstreamer0.10 fails to build on
DragonFly  2.7-DEVELOPMENT DragonFly v2.7.0.4.g63c2a-DEVELOPMENT #11: Mon Mar 29
07:30:32 PDT 2010     root@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

due to default gcc 4.1.2 not being able to handle code similar to that from
/usr/pkgsrc/multimedia/gstreamer0.10/work/gstreamer-0.10.28/gst/gstutils.c:

#include <inttypes.h>
#include <stdio.h>

int main(void)
{
  __uint128_t num = 1000;
  __uint128_t denom = 10;
  __uint128_t res = num / denom;
  printf("Result = %ju\n", (uintmax_t)res); 
  return 0;
}

$ gcc div128.c
/tmp//ccHUakkJ.o: In function `main':
div128.c:(.text+0x39): undefined reference to `__udivti3'
$ CCVER=gcc44 gcc -Wall -Werror div128.c
$ ./a.out
Result = 100

Using CCVER=gcc44 before pkgsrc bmake allows gstreamer0.10 and thus xfce4 to
build and run on x86_64.

----------
files: div128.c
keyword: libc, pkgsrc
messages: 8326
nosy: davshao
status: unread
title: gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1710>
_____________________________________________________Attachment:
div128.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 204 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20100330/5f907fad/attachment-0021.bin>


More information about the Bugs mailing list