Bug #1710

gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division

Added by davshao over 6 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


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

#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.

div128.c Magnifier (204 Bytes) davshao, 03/30/2010 04:21 PM


#1 Updated by swildner about 4 years ago

  • Status changed from New to Closed
  • Assignee deleted (0)

Closing. gcc44 has since been made the default compiler.

gstreamer builds too, so does Xfce4.

Also available in: Atom PDF