Bug 1039375

Summary: kbuild fails to build with GCC7
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dominique Leuenberger <dimstar>
Component: DevelopmentAssignee: Dirk Mueller <dmueller>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1030236    

Description Dominique Leuenberger 2017-05-16 17:48:40 UTC
In openSUSE:Factory:Staging:C

https://build.opensuse.org/build/openSUSE:Factory:Staging:C:DVD/standard/x86_64/kbuild/_log

The build is killed by brp for finding implicit function declarations, like for example:

>[  113s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn2814/src/kObjCache/kObjCache.c: In function 'kObjCacheLock':
>[  113s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn2814/src/kObjCache/kObjCache.c:4665:9: warning: implicit declaration of function 'flock'; did you mean 'fork'? [-Wimplicit-function-declaration]
>[  113s]      if (flock(pCache->fd, LOCK_EX) != 0)

and then later on

>[  170s] I: Program is using implicit definitions of functions getting
>[  170s]    pointers or implemented by macros. These functions need to use their
>[  170s]    correct prototypes to allow correct argument passing on e.g. x86_64 .
>[  170s]      - Implicit memory/string functions need #include <string.h>.
>[  170s]      - Implicit *printf functions need #include <stdio.h>.
>[  170s]      - Implicit *printf functions need #include <stdio.h>.
>[  170s]      - Implicit *read* functions need #include <unistd.h>.
>[  170s]      - Implicit *recv* functions need #include <sys/socket.h>.
>[  170s] W: kbuild implicit-pointer-decl /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn2814/src/kObjCache/kObjCache.c:4665
>[  170s] W: kbuild implicit-pointer-decl /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn2814/src/sed/lib/utils.c:96
>[  170s] 
>[  170s] I: Program is using implicit definitions of special functions.
>[  170s]    these functions need to use their correct prototypes to allow
>[  170s]    the lightweight buffer overflow checking to work.
>[  170s]      - Implicit memory/string functions need #include <string.h>.
>[  170s]      - Implicit *printf functions need #include <stdio.h>.
>[  170s]      - Implicit *printf functions need #include <stdio.h>.
>[  170s]      - Implicit *read* functions need #include <unistd.h>.
>[  170s]      - Implicit *recv* functions need #include <sys/socket.h>.
>[  170s] E: kbuild implicit-fortify-decl /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn2814/src/kash/eval.c:1240

GCC7 is scheduled to become the default compiler and we would really like to get a final push for the missing bits and pieces
Comment 1 Dominique Leuenberger 2017-05-17 17:57:16 UTC
I submitted a variant for the maintainers consideration

495683  State:new        By:dimstar      When:2017-05-17T17:10:35
        submit:          home:dimstar:Factory/kbuild@5 ->                   devel:tools:building
        Descr: - Add kbuild-gcc7.patch: Fix build with GCC7 (boo#1039375): we
Comment 2 Dominique Leuenberger 2017-05-18 11:22:50 UTC
My fix had been accepted and submitted to openSUSE:Factory
Comment 3 Swamp Workflow Management 2018-07-26 16:10:06 UTC
This is an autogenerated message for OBS integration:
This bug (1039375) was mentioned in
https://build.opensuse.org/request/show/625448 42.3 / kbuild+virtualbox
Comment 4 Swamp Workflow Management 2018-08-18 20:00:05 UTC
This is an autogenerated message for OBS integration:
This bug (1039375) was mentioned in
https://build.opensuse.org/request/show/630319 42.3 / kbuild+virtualbox
Comment 5 Swamp Workflow Management 2018-08-20 17:50:05 UTC
This is an autogenerated message for OBS integration:
This bug (1039375) was mentioned in
https://build.opensuse.org/request/show/630565 42.3 / kbuild+virtualbox
Comment 6 Swamp Workflow Management 2018-08-26 22:08:13 UTC
openSUSE-SU-2018:2524-1: An update that fixes 31 vulnerabilities is now available.

Category: security (important)
Bug References: 1039375,1076372,1079838,1093731,1097248,1098050,1101667
CVE References: CVE-2017-5715,CVE-2018-0739,CVE-2018-2676,CVE-2018-2685,CVE-2018-2686,CVE-2018-2687,CVE-2018-2688,CVE-2018-2689,CVE-2018-2690,CVE-2018-2693,CVE-2018-2694,CVE-2018-2698,CVE-2018-2830,CVE-2018-2831,CVE-2018-2835,CVE-2018-2836,CVE-2018-2837,CVE-2018-2842,CVE-2018-2843,CVE-2018-2844,CVE-2018-2845,CVE-2018-2860,CVE-2018-3005,CVE-2018-3055,CVE-2018-3085,CVE-2018-3086,CVE-2018-3087,CVE-2018-3088,CVE-2018-3089,CVE-2018-3090,CVE-2018-3091
Sources used:
openSUSE Leap 42.3 (src):    kbuild-0.1.9998svn3110-4.3.1, virtualbox-5.2.18-56.1