JDK Build on Fedora 28

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Mon Jun 18 20:02:52 UTC 2018


Hi Patrick!

Try building with “—disable-warnings-as-errors”, that should fix the problem.

Adrian

PS: Replying from mobile, excuse my brevity.

> On Jun 18, 2018, at 9:36 PM, Patrick Reinhart <patrick at reini.net> wrote:
> 
> Hi everybody,
> 
> Can anyone give me some advice in what I should do in order to build the OpenJDK on a Fedora 28?
> 
> 
> -Patrick
> 
> 
> At the moment I get those errors:
> 
> Compiling 5 files for jdk.internal.vm.compiler.management
> /home/pr/sources/jdk/src/hotspot/os/posix/os_posix.cpp: In static member function ‘static int os::create_file_for_heap(const char*)’:
> /home/pr/sources/jdk/src/hotspot/os/posix/os_posix.cpp:172:16: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
>   (void)strncpy(fullname, dir, strlen(dir)+1);
>         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/pr/sources/jdk/src/hotspot/os/posix/os_posix.cpp:172:38: note: length computed here
>   (void)strncpy(fullname, dir, strlen(dir)+1);
>                                ~~~~~~^~~~~
> /home/pr/sources/jdk/src/hotspot/os/posix/os_posix.cpp:173:16: error: ‘char* strncat(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
>   (void)strncat(fullname, name_template, strlen(name_template));
>         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
> gmake[3]: *** [lib/CompileJvm.gmk:151: /home/pr/sources/jdk/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/os_posix.o] Error 1
> gmake[3]: *** Waiting for unfinished jobs....
> gmake[2]: *** [make/Main.gmk:257: hotspot-server-libs] Error 2
> 
> ERROR: Build failed for target 'default (exploded-image)' in configuration 'linux-x86_64-normal-server-release' (exit code 2)
> Stopping sjavac server




More information about the build-dev mailing list