Problem building Solaris Additions with current GCC (take 2)

Discussions related to using the OSE version of VirtualBox.

Problem building Solaris Additions with current GCC (take 2)

Postby mYse|f » 2. Jan 2016, 21:33

Note: This question was originally posted to the vbox-dev mailing list, however, during the last four days the only response I got were "dating scam" emails. Hopefully, this time it'll be different.

There isn't much to say. I want to build the combined Guest Additions package for Solaris, but the compilation fails when I set KBUILD_TARGET_ARCH to x86 (see the attached log -- tested on Oracle Solaris 11.3). Also, building the Shared Folder Driver for Solaris 10 (vboxfs_s10) fails regardless of the target architecture (second attachment). It would be good to know what setup you're using when packaging this. Thanks in advance.

terminal.log
Code: Select all   Expand viewCollapse view
pk@solaris:~/VirtualBox-5.0.12$ kmk all packing KBUILD_TARGET_ARCH=x86
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Compiling RuntimeGuestR0 - /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp
In file included from /export/home/pk/VirtualBox-5.0.12/include/iprt/types.h:155:0,
                 from /export/home/pk/VirtualBox-5.0.12/include/iprt/mem.h:31,
                 from /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp:34:
/usr/include/sys/types.h:89:14: error: conflicting declaration ‘typedef long int ptrdiff_t’
 typedef long ptrdiff_t;  /* pointer difference */
              ^
In file included from /export/home/pk/VirtualBox-5.0.12/include/iprt/types.h:154:0,
                 from /export/home/pk/VirtualBox-5.0.12/include/iprt/mem.h:31,
                 from /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp:34:
/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/include/stddef.h:147:26: error: ‘ptrdiff_t’ has a previous declaration as ‘typedef int ptrdiff_t’
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
                          ^
In file included from /export/home/pk/VirtualBox-5.0.12/include/iprt/types.h:155:0,
                 from /export/home/pk/VirtualBox-5.0.12/include/iprt/mem.h:31,
                 from /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp:34:
/usr/include/sys/types.h:496:17: error: conflicting declaration ‘typedef ulong_t size_t’
 typedef ulong_t size_t;  /* size of something in bytes */
                 ^
In file included from /export/home/pk/VirtualBox-5.0.12/include/iprt/types.h:154:0,
                 from /export/home/pk/VirtualBox-5.0.12/include/iprt/mem.h:31,
                 from /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp:34:
/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/include/stddef.h:212:23: error: ‘size_t’ has a previous declaration as ‘typedef unsigned int size_t’
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /export/home/pk/VirtualBox-5.0.12/include/iprt/string.h:84:0,
                 from /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp:38:
/usr/include/string.h:18:12: error: ‘size_t’ is already declared in this scope
 using std::size_t;
            ^
kmk: *** [/export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release/obj/RuntimeGuestR0/common/alloc/alloc.o] Error 1
The failing command:
@g++ -c -O2 -Wpointer-arith -Winline -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -O2 -nodefaultlibs -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -fno-exceptions -fno-rtti -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/r0drv/solaris/vbi/i86pc -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/sys -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/include -I/usr/platform/i86pc/include -I/usr/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release/obj/RuntimeGuestR0/dtrace -I/export/home/pk/VirtualBox-5.0.12/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_SOLARIS -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/opt/VirtualBox\" -DRTPATH_APP_PRIVATE_ARCH=\"/opt/VirtualBox/i386\" -DRTPATH_APP_PRIVATE_ARCH_TOP=\"/opt/VirtualBox\" -DRTPATH_SHARED_LIBS=\"/opt/VirtualBox/i386\" -DRTPATH_APP_DOCS=\"/opt/VirtualBox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R0DRV -DVBOX_WITH_NATIVE_DTRACE -D_MACHDEP -D_KERNEL -D_STRICT_STDC -DIN_GUEST -DIN_GUEST_R0 -DIN_RT_R0 -DRT_WITH_VBOX -DRT_WITHOUT_NOCRT_WRAPPERS -DRT_NO_EXPORT_SYMBOL -Wp,-MD,/export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release/obj/RuntimeGuestR0/common/alloc/alloc.o.dep -Wp,-MT,/export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release/obj/RuntimeGuestR0/common/alloc/alloc.o -Wp,-MP -o /export/home/pk/VirtualBox-5.0.12/out/solaris.x86/release/obj/RuntimeGuestR0/common/alloc/alloc.o /export/home/pk/VirtualBox-5.0.12/src/VBox/Runtime/common/alloc/alloc.cpp


terminal2.log
Code: Select all   Expand viewCollapse view
pk@solaris:~/VirtualBox-5.0.12$ kmk all packing VBOX_OSE=
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Pass - Programs
kBuild: Compiling vboxfs_s10 - /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
In file included from /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:48:0:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs.h:70:1: error: unknown type name ‘fs_operation_def_t’
 extern const fs_operation_def_t g_VBoxVFS_vnodeops_template[];
 ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function ‘sffs_init’:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:160:2: error: unknown type name ‘fs_operation_def_t’
  static const fs_operation_def_t sffs_vfsops_template[] = {
  ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:161:3: error: excess elements in struct initializer
   VFSNAME_MOUNT,  sffs_mount,
   ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:161:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:162:3: error: excess elements in char array initializer
   VFSNAME_UNMOUNT, sffs_unmount,
   ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:162:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:162:3: error: excess elements in struct initializer
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:162:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:163:3: error: excess elements in char array initializer
   VFSNAME_ROOT,  sffs_root,
   ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:163:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:163:3: error: excess elements in struct initializer
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:163:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:164:3: error: excess elements in char array initializer
   VFSNAME_STATVFS, sffs_statvfs,
   ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:164:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:164:3: error: excess elements in struct initializer
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:164:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:165:3: error: excess elements in struct initializer
   NULL,   NULL
   ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:165:3: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:166:2: error: excess elements in struct initializer
  };
  ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:166:2: error: (near initialization for ‘sffs_vfsops_template’)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:166:2: error: wide character array initialized from non-wide string
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200:2: error: implicit declaration of function ‘vfs_setfsops’ [-Werror=implicit-function-declaration]
  error = vfs_setfsops(fstype, sffs_vfsops_template, NULL);
  ^
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: At top level:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:243:1: warning: ‘sffs_print’ defined but not used [-Wunused-function]
 sffs_print(sffs_data_t *sffs)
 ^
cc1: some warnings being treated as errors
kmk: *** [/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o] Error 1
The failing command:
@gcc -c -O2 -Wpointer-arith -Winline -Wno-pointer-sign -Wmissing-prototypes -Wstrict-prototypes -fdiagnostics-show-option -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wparentheses -O2 -fno-omit-frame-pointer -ffreestanding -nodefaultlibs -fno-strict-aliasing -fno-common -std=c99 -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow  -mno-red-zone -mcmodel=kernel  -fno-reorder-blocks -fno-asynchronous-unwind-tables -funit-at-a-time -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/solaris10 -I/usr/platform/i86pc/include -I/usr/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/dtrace -I/export/home/pk/VirtualBox-5.0.12/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release -DVBOX -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_SOLARIS -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/opt/VirtualBox\" -DRTPATH_APP_PRIVATE_ARCH=\"/opt/VirtualBox/amd64\" -DRTPATH_APP_PRIVATE_ARCH_TOP=\"/opt/VirtualBox\" -DRTPATH_SHARED_LIBS=\"/opt/VirtualBox/amd64\" -DRTPATH_APP_DOCS=\"/opt/VirtualBox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R0DRV -DVBOX_WITH_NATIVE_DTRACE -D_MACHDEP -D_KERNEL -D_STRICT_STDC -DIN_GUEST -DIN_GUEST_R0 -DVBOX_WITH_HGCM -DVBOX_VFS_SOLARIS_10U6 -DVBOX_SVN_REV=104815 -Wp,-MD,/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o.dep -Wp,-MT,/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o -Wp,-MP -o /export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes

Re: Problem building Solaris Additions with current GCC (tak

Postby mYse|f » 5. Jan 2016, 19:11

Here's the debug output as requested by Frank Mehnert on the mailing list. This is for the vboxfs_s10 as building the Solaris Additions isn't supposed to work with recent versions of GCC.
Attachments
file.i.7z
(207.83 KiB) Downloaded 11 times
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes

Re: Problem building Solaris Additions with current GCC (tak

Postby frank » 5. Jan 2016, 19:17

Sorry, but this file does not help. This file is compiled with gcc 3.4.3 (which is supposed to work) while you complain that it doesn't compile with gcc 4.8.2 (also according to the two log files you posted.
frank
Oracle Corporation
 
Posts: 3362
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows

Re: Problem building Solaris Additions with current GCC (tak

Postby mYse|f » 5. Jan 2016, 21:08

In that case, here's the debug output for both of the issues. I originally complained about the current GCC because I didn't know that you're using GCC 3.4.3 internally. Now I'm mainly interested in vboxfs_s10, however, the ability to build Solaris Additions using GCC 4.8.2 or later would be great. Thank you for working on this.
Attachments
file.i-vboxfs_s10.7z
Debug output when building with VBOX_OSE=
(210.06 KiB) Downloaded 10 times
file.i-x86.7z
Debug output when building with KBUILD_TARGET_ARCH=x86
(31.58 KiB) Downloaded 12 times
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes

Re: Problem building Solaris Additions with current GCC (tak

Postby mYse|f » 5. Jan 2016, 23:21

Just for the sake of clarity, vboxfs_s10 doesn't build no matter what version of GCC I use. I realized that I haven't mentioned this yet.

Here's the terminal log as well as the debug output when building it using GCC 3.4.3:
Code: Select all   Expand viewCollapse view
pk@solaris:~/VirtualBox-5.0.12$ kmk all packing VBOX_OSE=
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Pass - Programs
kBuild: Compiling vboxfs_s10 - /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
In file included from /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:48:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs.h:70: error: syntax error before "g_VBoxVFS_vnodeops_template"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs.h:70: warning: type defaults to `int' in declaration of `g_VBoxVFS_vnodeops_template'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs.h:70: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function `sffs_init':
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:160: error: syntax error before "sffs_vfsops_template"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: At top level:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:178: error: syntax error before "void"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:179: warning: type defaults to `int' in declaration of `sffs_fstype'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:179: error: non-static declaration of 'sffs_fstype' follows static declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:99: error: previous declaration of 'sffs_fstype' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:179: error: `fstype' undeclared here (not in a function)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:179: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:180: error: syntax error before "do"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:188: warning: type defaults to `int' in declaration of `sfprov'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:188: error: conflicting types for 'sfprov'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:118: error: previous definition of 'sfprov' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:188: warning: initialization makes integer from pointer without a cast
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:188: error: initializer element is not constant
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:188: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:189: error: syntax error before "if"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:194: warning: type defaults to `int' in declaration of `error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:194: error: initializer element is not constant
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:194: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:195: error: syntax error before "if"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: warning: type defaults to `int' in declaration of `error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: redefinition of 'error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:194: error: previous definition of 'error' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: implicit declaration of function `vfs_setfsops'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: `sffs_vfsops_template' undeclared here (not in a function)
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: initializer element is not constant
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:201: error: syntax error before "if"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: type defaults to `int' in declaration of `error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: error: redefinition of 'error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: previous definition of 'error' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: error: redefinition of 'error'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:200: error: previous definition of 'error' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: error: initializer element is not constant
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:207: error: syntax error before "if"
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: error: syntax error before numeric constant
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: warning: type defaults to `int' in declaration of `cmn_err'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: warning: function declaration isn't a prototype
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: error: conflicting types for 'cmn_err'
/usr/include/sys/cmn_err.h:34: error: previous declaration of 'cmn_err' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: error: conflicting types for 'cmn_err'
/usr/include/sys/cmn_err.h:34: error: previous declaration of 'cmn_err' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:209: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:215: warning: type defaults to `int' in declaration of `sffs_major'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:215: error: non-static declaration of 'sffs_major' follows static declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:100: error: previous declaration of 'sffs_major' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:215: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:216: error: syntax error before '}' token
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: error: syntax error before '&' token
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: warning: type defaults to `int' in declaration of `mutex_init'
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: warning: function declaration isn't a prototype
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: error: conflicting types for 'mutex_init'
/usr/include/sys/mutex.h:68: error: previous declaration of 'mutex_init' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: error: conflicting types for 'mutex_init'
/usr/include/sys/mutex.h:68: error: previous declaration of 'mutex_init' was here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:217: warning: data definition has no type or storage class
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function `sf_pn_get':
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:228: warning: declaration of 'error' shadows a global declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: shadowed declaration is here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function `sffs_mount':
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:265: warning: declaration of 'error' shadows a global declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: shadowed declaration is here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:421: warning: passing arg 1 of `sfprov_mount' makes pointer from integer without a cast
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function `sffs_unmount':
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:491: warning: declaration of 'error' shadows a global declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: shadowed declaration is here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: In function `sffs_statvfs':
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:551: warning: declaration of 'error' shadows a global declaration
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:206: warning: shadowed declaration is here
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c: At top level:
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs.h:70: warning: array 'g_VBoxVFS_vnodeops_template' assumed to have one element
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:261: warning: 'sffs_mount' defined but not used
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:489: warning: 'sffs_unmount' defined but not used
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:533: warning: 'sffs_root' defined but not used
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:547: warning: 'sffs_statvfs' defined but not used
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:100: warning: 'sffs_major' defined but not used
/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c:244: warning: 'sffs_print' defined but not used
kmk: *** [/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o] Error 1
The failing command:
@gcc -c -O2 -Wpointer-arith -Winline -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wformat -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wparentheses -O2 -fno-omit-frame-pointer -ffreestanding -nodefaultlibs -fno-strict-aliasing -fno-common -std=c99 -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow  -mno-red-zone -mcmodel=kernel  -fno-reorder-blocks -fno-asynchronous-unwind-tables -funit-at-a-time -I/export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/solaris10 -I/usr/platform/i86pc/include -I/usr/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/dtrace -I/export/home/pk/VirtualBox-5.0.12/include -I/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release -DVBOX -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_SOLARIS -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/opt/VirtualBox\" -DRTPATH_APP_PRIVATE_ARCH=\"/opt/VirtualBox/amd64\" -DRTPATH_APP_PRIVATE_ARCH_TOP=\"/opt/VirtualBox\" -DRTPATH_SHARED_LIBS=\"/opt/VirtualBox/amd64\" -DRTPATH_APP_DOCS=\"/opt/VirtualBox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R0DRV -DVBOX_WITH_NATIVE_DTRACE -D_MACHDEP -D_KERNEL -D_STRICT_STDC -DIN_GUEST -DIN_GUEST_R0 -DVBOX_WITH_HGCM -DVBOX_VFS_SOLARIS_10U6 -DVBOX_SVN_REV=104815 -Wp,-MD,/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o.dep -Wp,-MT,/export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o -Wp,-MP -o /export/home/pk/VirtualBox-5.0.12/out/solaris.amd64/release/obj/vboxfs_s10/vboxfs_vfs.o /export/home/pk/VirtualBox-5.0.12/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
Attachments
file.i-vboxfs_s10+gcc3.7z
Debug output when building with VBOX_OSE= using GCC 3.4.3
(207.87 KiB) Downloaded 10 times
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes

Re: Problem building Solaris Additions with current GCC (tak

Postby frank » 6. Jan 2016, 11:34

The Solaris 10 stuff does not build because the corresponding headers in Additions/solaris/SharedFolders/solaris10 are not available in the public available source code tree. I need to check what's the problem with these headers but this will take more time.

Regarding the gcc 4.8 problem: The problem seems to be more complicated and this needs more work. For now I suggest to use an older compiler.
frank
Oracle Corporation
 
Posts: 3362
Joined: 7. Jun 2007, 09:11
Location: Dresden, Germany
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows

Re: Problem building Solaris Additions with current GCC (tak

Postby mYse|f » 6. Jan 2016, 17:02

Now I feel like an idiot because I had previously looked into Makefile.kmk and somehow managed to overlook this, even though it's clearly visible. Thank you very much for highlighting the issue. I'm pretty sure this is just another case of missing sources (the LICENSE of Solaris Additions doesn't indicate otherwise) as I experienced these a lot when I tried to reproduce VirtualBox from source. Please let me know once you add the missing files to the source tree (or if I should I fill a bug report) so I can do some tests and report back.
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes

Re: Problem building Solaris Additions with current GCC (tak

Postby mYse|f » 12. Jan 2016, 08:34

I'm moving this issue to the bug tracker (ticket #15027). Please report any progress there.
mYse|f
 
Posts: 13
Joined: 10. Sep 2015, 01:10
Location: Slovakia, Europe
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Mainly Trisquel GNU/Linux for compilation purposes


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest