Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 2025 14:40:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 284486] devel/asmutils: Fails to build with GCC 14: error: implicit declaration of function 'acos' [-Wimplicit-function-declaration]
Message-ID:  <bug-284486-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284486

            Bug ID: 284486
           Summary: devel/asmutils: Fails to build with GCC 14: error:
                    implicit declaration of function 'acos'
                    [-Wimplicit-function-declaration]
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: https://pkg-status.freebsd.org/gohan05/data/134i386-de
                    fault-foo/2025-01-24_09h47m13s/logs/asmutils-0.18_10.l
                    og
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: salvadore@freebsd.org
            Blocks: 281091

The port fails to build with GCC 14, which is about to become GCC_DEFAULT
version. This link can help: https://gcc.gnu.org/gcc-14/porting_to.html

gcc14 -D__CPU__=3D386 -Wall -O1 -Os -march=3Di386 -g -o testm-shared testm.c
./libm.so.0
testm.c: In function 'main':
testm.c:68:22: error: implicit declaration of function 'acos'
[-Wimplicit-function-declaration]
   68 |   MATH_ASSERT("acos",acos(1.) , 0.);
      |                      ^~~~
testm.c:52:4: note: in definition of macro 'MATH_ASSERT'
   52 |   (expr >=3D result-EPS && expr <=3D result+EPS) ? "ok" :
"fail",(double)expr,(double)result)
      |    ^~~~
testm.c:22:1: note: include '<math.h>' or provide a declaration of 'acos'
   21 | #include <assert.h>
  +++ |+#include <math.h>
   22 |=20
testm.c:68:22: warning: incompatible implicit declaration of built-in funct=
ion
'acos' [-Wbuiltin-declaration-mismatch]
   68 |   MATH_ASSERT("acos",acos(1.) , 0.);
      |                      ^~~~
testm.c:52:4: note: in definition of macro 'MATH_ASSERT'
   52 |   (expr >=3D result-EPS && expr <=3D result+EPS) ? "ok" :
"fail",(double)expr,(double)result)
      |    ^~~~
testm.c:68:22: note: include '<math.h>' or provide a declaration of 'acos'
   68 |   MATH_ASSERT("acos",acos(1.) , 0.);
      |                      ^~~~
testm.c:52:4: note: in definition of macro 'MATH_ASSERT'
   52 |   (expr >=3D result-EPS && expr <=3D result+EPS) ? "ok" :
"fail",(double)expr,(double)result)
      |    ^~~~
testm.c:72:23: error: implicit declaration of function 'acosh'
[-Wimplicit-function-declaration]
   72 |   MATH_ASSERT("acosh",acosh(1.) , 0.);


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281091
[Bug 281091] [exp-run] Update GCC_DEFAULT to 14 etc.
--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284486-7788>