Opened 4 years ago

Closed 4 years ago

#16929 closed bug (fixed)

Error: conflicting declaration of C function while building new image in beta 2

Reported by: mbrumbelow Owned by: bonefish
Priority: high Milestone: R1/beta3
Component: Build System Version: R1/beta2
Keywords: Cc:
Blocked By: Blocking:
Platform: x86-64

Description

Building an image of the latest code (hrev55063) on beta 2, generates over 300+ errors of type "error: conflicting declaration of C function" for writev_pos and readv_pos c functions.

Built using:
~> jam -q @nightly-raw
~> jam -q @nightly-anyboot

Change History (10)

comment:1 by pulkomandy, 4 years ago

Please include complete information:

  • What host OS are you running?
  • Which command did you use to configure the build?
  • A copy of the complete build log

I am building Haiku frequently on both Haiku and Linux and I had no problem. You are not the first person to complain about this but no one wants to give us useful information to investigate it, and find why it works sometimes, but not always. As you can see https://ci.haiku-os.org , our buildbots have no problem.

So, without more information about your setup, we can't help.

Version 0, edited 4 years ago by pulkomandy (next)

comment:2 by nephele, 4 years ago

Component: - GeneralBuild System
Keywords: build function error beta2 removed
Owner: changed from nobody to bonefish

https://git.haiku-os.org/haiku/commit/?id=f97357a6ed57951086b29e0fa0b3a7393feecf72

It's possible building on beta2 is broken regardless, since this is only in the nightly.

comment:3 by mbrumbelow, 4 years ago

Its broken 100%. Since beta2 is advertised on the site, it would make sense to update the building instructions for beta2 uses to do a pkgman update before building.

The build bots are not building the code as per the instructions on the website. If they were then the builds for x86_64 would fail. See https://dev.haiku-os.org/ticket/16877. The build process does not match what developers are expected to do. I would recommend taking the patch for that ticket and submitting it to Gerrit.

With these items fixed/resolved I will be the last person to have this issue. :)

comment:4 by nephele, 4 years ago

Please provide the info pulkomandy requested, it is clearly not broken for everyone. It's impossible to fix if the info is not provided as we can't know what you are doing differently.

comment:5 by pulkomandy, 4 years ago

With these items fixed/resolved I will be the last person to have this issue. :)

You are not, some other people have complained over IRC but they also did not provide sufficient logs or information for us to investigate this.

It causes frustration for us (since we can't fix the bug without reproducing it) as much as for you (since from your point of view it looks like we are ignoring the problem and the thing is obviously broken).

comment:6 by mbrumbelow, 4 years ago

  1. Local haiku git repository
~/source/haiku> git status
HEAD detached at hrev55063

  1. Tool install and configuration
~/source/buildtools/jam> ./jam0 -sBINDIR=$HOME/bin install
~/source/buildtools/jam> pkgman install cmd:python3 cmd:xorriso
~/source/haiku/generated.x86_64> ../configure --cross-tools-source ../../buildtools --build-cross-tools x86_64

  1. Build (Success)
~/source/haiku/generated.x86_64> jam -q @nightly-anyboot
Starting build of type regular ... 
Building Haiku Nightly 
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...found 98919 target(s)...
...updating 15840 target(s)...
MkDir1 objects 
MkDir1 objects/haiku_host 
MkDir1 objects/haiku_host/x86_64 
MkDir1 objects/haiku_host/x86_64/release 
MkDir1 objects/haiku_host/x86_64/release/tools 
MkDir1 objects/haiku_host/x86_64/release/tools/anyboot 
C++ objects/haiku_host/x86_64/release/tools/anyboot/anyboot.o 
Link objects/haiku_host/x86_64/release/tools/anyboot/anyboot 
Chmod1 objects/haiku_host/x86_64/release/tools/anyboot/anyboot 
MkDir1 objects/haiku 
MkDir1 objects/haiku/x86_64 
MkDir1 objects/haiku/x86_64/release 
MkDir1 objects/haiku/x86_64/release/system 
MkDir1 objects/haiku/x86_64/release/system/boot 
MkDir1 objects/haiku/x86_64/release/system/boot/platform 
MkDir1 objects/haiku/x86_64/release/system/boot/platform/bios_ia32 
MkDir1 objects/haiku/x86_64/release/system/boot/platform/bios_ia32/bios_ia32 
MkDir1 build_packages 
MkDir1 download 
MkDir1 objects/haiku/x86_64/packaging 
MkDir1 objects/haiku/x86_64/packaging/repositories 
ChecksumFileSHA256 objects/haiku/x86_64/packaging/repositories/HaikuPorts-checksum 
DownloadLocatedFile1 download/gcc_syslibs_devel-8.3.0_2019_05_24-7-x86_64.hpkg 
--2021-04-28 12:40:44--  https://eu.hpkg.haiku-os.org/haikuports/master/build-packages/16e18d7323ad5a8d99b2e548b814fa879825c21283e8418ef02f74bbcacf715d/packages/gcc_syslibs_devel-8.3.0_2019_05_24-7-x86_64.hpkg
Resolving eu.hpkg.haiku-os.org... 2a03:b0c0:2:d0::3481:e001, 104.248.198.131
Connecting to eu.hpkg.haiku-os.org|2a03:b0c0:2:d0::3481:e001|:443... failed: Network is unreachable.
Connecting to eu.hpkg.haiku-os.org|104.248.198.131|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2283589 (2.2M) [application/octet-stream]
Saving to: ‘download/gcc_syslibs_devel-8.3.0_2019_05_24-7-x86_64.hpkg’

download/gcc_syslib 100%[===================>]   2.18M   460KB/s    in 5.0s    

2021-04-28 12:40:49 (449 KB/s) - ‘download/gcc_syslibs_devel-8.3.0_2019_05_24-7-x86_64.hpkg’ saved [2283589/2283589]

MkDir1 objects/haiku_host/x86_64/release/build 
MkDir1 objects/haiku_host/x86_64/release/build/libroot 
C++ objects/haiku_host/x86_64/release/build/libroot/function_remapper.o 
In file included from <command-line>:
./../headers/build/BeOSBuildCompatibility.h:54:16: error: conflicting declaration of C function 'ssize_t readv_pos(int, off_t, const iovec*, int)'
 extern ssize_t readv_pos(int fd, off_t pos, const struct iovec* vec,
                ^~~~~~~~~
In file included from ./../headers/build/BeOSBuildCompatibility.h:33,
                 from <command-line>:
/boot/system/develop/headers/posix/sys/uio.h:23:9: note: previous declaration 'ssize_t readv_pos(int, off_t, const iovec*, size_t)'
 ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
         ^~~~~~~~~
In file included from <command-line>:
./../headers/build/BeOSBuildCompatibility.h:56:16: error: conflicting declaration of C function 'ssize_t writev_pos(int, off_t, const iovec*, int)'
 extern ssize_t writev_pos(int fd, off_t pos, const struct iovec* vec,
                ^~~~~~~~~~
In file included from ./../headers/build/BeOSBuildCompatibility.h:33,
                 from <command-line>:
/boot/system/develop/headers/posix/sys/uio.h:25:9: note: previous declaration 'ssize_t writev_pos(int, off_t, const iovec*, size_t)'
 ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
         ^~~~~~~~~~

gcc -c "../src/build/libroot/function_remapper.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -include ../headers/build/HaikuBuildCompatibility.h -D'HAIKU_BUILD_ATTRIBUTES_DIR="/boot/home/source/haiku/generated.x86_64/attributes"' -D_HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS=1 -fPIC -include ../headers/build/BeOSBuildCompatibility.h -DARCH_x86_64 -D_NO_INLINE_ASM -D__NO_INLINE__ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_USE_XATTR -DHAIKU_HOST_PLATFORM_HAIKU -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH=\"x86_64\" -iquote ../build/user_config_headers -iquote ../build/config_headers -iquote ../src/build/libroot -iquote objects/common/build/libroot -iquote objects/haiku_host/x86_64/common/build/libroot -iquote objects/haiku/x86_64/common/build/libroot -I ../headers/build -I ../headers/build/os -I ../headers/build/os/app -I ../headers/build/os/drivers -I ../headers/build/os/kernel -I ../headers/build/os/interface -I ../headers/build/os/storage -I ../headers/build/os/support -I ../headers/build/private/kernel -I ../headers/build/private/libroot -I ../headers/build/private/system -I ../headers/build/host/haiku_host -I ../headers/build -I ../headers/build/os -I ../headers/build/os/add-ons/registrar -I ../headers/build/os/app -I ../headers/build/os/bluetooth -I ../headers/build/os/drivers -I ../headers/build/os/kernel -I ../headers/build/os/interface -I ../headers/build/os/locale -I ../headers/build/os/storage -I ../headers/build/os/support -I ../headers/build/private -o "objects/haiku_host/x86_64/release/build/libroot/function_remapper.o"

...failed C++ objects/haiku_host/x86_64/release/build/libroot/function_remapper.o ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 10 target(s)...
...updated 24 target(s)...

comment:8 by korli, 4 years ago

Please check on hrev55066 or newer.

comment:9 by mbrumbelow, 4 years ago

Fixed, please close.

comment:10 by nephele, 4 years ago

Milestone: UnscheduledR1/beta3
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.