prefab-* Build Problems Resolution Notes/OpenSolaris Code Integration

Initial errors prior to incorporation of header files:

[tyson@nagasaki i9os]$ make prefab-l4test
cd Microkernel/user/apps/l4test && pwd && make
/home/tyson/i9os/Microkernel/user/apps/l4test
make[1]: Entering directory `/home/tyson/i9os/Microkernel/user/apps/l4test'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: Entering directory `/home/tyson/i9os/Microkernel/user/lib/io'
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: *** No rule to make target `../../include/stdarg.h', needed by `get_hex.o'. Stop.
make[2]: Leaving directory `/home/tyson/i9os/Microkernel/user/lib/io'
make[1]: *** [../../lib/io/libio.a] Error 2
make[1]: Leaving directory `/home/tyson/i9os/Microkernel/user/apps/l4test'
make: *** [prefab-l4test] Error 2

After adding stdarg.h, iso/stdarg_c99.h and iso/stdarg_iso.h from OpenSolaris to /Microkernel/user/include:

===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
make[2]: *** No rule to make target `sys/va_impl.h', needed by `get_hex.o'. Stop.
make[2]: Leaving directory `/home/tyson/i9os/Microkernel/user/lib/io'
make[1]: *** [../../lib/io/libio.a] Error 2
make[1]: Leaving directory `/home/tyson/i9os/Microkernel/user/serv/sigma0'
make: *** [prefab-sigma0] Error 2

We still have the same issue, after adding sys/va_impl.h, so we hack up /Microkernel/user/include/iso/stdarg_iso.h, and change the #include <sys/va_impl.h> line to #include "sys/va_impl.h". Make still barfs.

When we strace make:

[pid 14645] open("../../include/iso", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 5
[pid 14645] fstat64(5, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 14645] getdents64(5, /* 6 entries */, 4096) = 160
[pid 14645] getdents64(5, /* 0 entries */, 4096) = 0
[pid 14645] close(5) = 0
[pid 14645] stat64("../../include/iso/RCS", 0xbfdac7a4) = -1 ENOENT (No such file or directory)
[pid 14645] stat64("../../include/iso/SCCS", 0xbfdac7a4) = -1 ENOENT (No such file or directory)
[pid 14645] stat64("sys/va_impl.h", 0xbfdabac4) = -1 ENOENT (No such file or directory)
[pid 14645] stat64("sys", 0xbfdac7c4) = -1 ENOENT (No such file or directory)
[pid 14645] stat64("sys/RCS", 0xbfdac7c4) = -1 ENOENT (No such file or directory)
[pid 14645] stat64("sys/SCCS", 0xbfdac7c4) = -1 ENOENT (No such file or directory)

For the time being, revert the header referenced in /Microkernel/user/include/iso/stdarg_iso.h back to #include <sys/va_impl.h>, create the directory /Personalities/Solaris, and move the /Microkernel/user/include/sys directory there. We also ought to move the other (Open)Solaris headers to the Solaris Personality directory.

Mod the prefab-l4test build option in the i9BE Makefile to run cd Microkernel/user/apps/l4test && pwd && make -IPersonalities/Solaris instead of cd Microkernel/user/apps/l4test && pwd && make temporarily.

The Root of the Problem:
Running make in /Microkernel/user/lib/io spews:

[tyson@nagasaki io]$ make
===> Rebuilding ./Makefile
config.status: creating ./Makefile
config.status: creating config.h
config.status: config.h is unchanged
===> get_hex.cc
gcc -x c++ -I../../include -I../.. -I/usr/lib/gcc/i386-redhat-linux/4.1.2/include -fno-stack-protector -nostdinc -g -O2 -Wall -Wshadow -Wconversion -fno-exceptions -c get_hex.cc -o get_hex.o
In file included from get_hex.cc:33:
../../include/l4io.h:37:20: error: stdarg.h: No such file or directory
In file included from get_hex.cc:32:
../../include/l4/types.h: In function ‘L4_Fpage_t L4_Set_Rights(L4_Fpage_t*, L4_Word_t)’:
../../include/l4/types.h:183: warning: conversion to ‘unsigned char:3’ from ‘L4_Word_t’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_FpageAddRights(L4_Fpage_t, L4_Word_t)’:
../../include/l4/types.h:189: warning: conversion to ‘unsigned char:3’ from ‘long unsigned int’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_FpageAddRightsTo(L4_Fpage_t*, L4_Word_t)’:
../../include/l4/types.h:195: warning: conversion to ‘unsigned char:3’ from ‘long unsigned int’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_FpageRemoveRights(L4_Fpage_t, L4_Word_t)’:
../../include/l4/types.h:201: warning: conversion to ‘unsigned char:3’ from ‘long unsigned int’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_FpageRemoveRightsFrom(L4_Fpage_t*, L4_Word_t)’:
../../include/l4/types.h:207: warning: conversion to ‘unsigned char:3’ from ‘long unsigned int’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_Fpage(L4_Word_t, L4_Word_t)’:
../../include/l4/types.h:238: warning: conversion to ‘unsigned char:6’ from ‘long unsigned int’ may alter its value
../../include/l4/types.h: In function ‘L4_Fpage_t L4_FpageLog2(L4_Word_t, int)’:
../../include/l4/types.h:247: warning: conversion to ‘unsigned char:6’ from ‘int’ may alter its value
../../include/l4/types.h: In function ‘L4_ThreadId_t L4_GlobalId(L4_Word_t, L4_Word_t)’:
../../include/l4/types.h:303: warning: conversion to ‘unsigned int:18’ from ‘L4_Word_t’ may alter its value
../../include/l4/types.h:304: warning: conversion to ‘short unsigned int:14’ from ‘L4_Word_t’ may alter its value
../../include/l4/types.h: In function ‘L4_Time_t L4_TimePeriod(L4_Word64_t)’:
../../include/l4/types.h:506: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:506: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:507: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:507: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:508: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:508: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:509: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:509: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:510: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:510: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:511: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:511: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:512: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:512: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:513: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:513: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:514: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:514: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:515: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:515: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:516: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:516: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:521: warning: conversion to ‘L4_Word_t’ from ‘L4_Word64_t’ may alter its value
../../include/l4/types.h:527: warning: conversion to ‘short unsigned int:10’ from ‘L4_Word_t’ may alter its value
../../include/l4/types.h:527: warning: conversion to ‘unsigned char:5’ from ‘L4_Word_t’ may alter its value
In file included from get_hex.cc:33:
../../include/l4io.h: At global scope:
l:43: error: ‘va_list’ has not been declared
get_hex.cc: In function ‘L4_Word_t get_hex()’:
get_hex.cc:42: warning: conversion to ‘char’ from ‘int’ may alter its value
get_hex.cc:47: warning: conversion to ‘char’ from ‘int’ may alter its value
get_hex.cc:51: warning: conversion to ‘char’ from ‘int’ may alter its value
get_hex.cc:53: warning: conversion to ‘char’ from ‘int’ may alter its value
make: *** [get_hex.o] Error 1