OpenOrbis/mira-project-archive

Mira Plugin Example don't compile

Closed this issue · 2 comments

well, atm, i try a lot of things, but the problem still the freebsd headers, he can't find types.h, and i updated all dirs and etc... and still giving it.

Compiling src/example_plugin.c ...
Using built-in specs.
COLLECT_GCC=gcc
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.3.0-19' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Debian 7.3.0-19)
COLLECT_GCC_OPTIONS='-I' 'src' '-I' '../../Dependencies/oni-framework/include' '-I' '../../Dependencies/freebsd-headers/include' '-D' '_KERNEL' '-D' '_DEBUG=1' '-std=c11' '-v' '-O2' '-fno-builtin' '-nostartfiles' '-nodefaultlibs' '-nostdlib' '-nostdinc' '-fcheck-new' '-ffreestanding' '-fno-strict-aliasing' '-fno-exceptions' '-fno-asynchronous-unwind-tables' '-Wall' '-m64' '-fPIC' '-Werror=implicit-function-declaration' '-Wno-unknown-pragmas' '-c' '-o' 'build/src/example_plugin.o' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/7/cc1 -quiet -nostdinc -v -I src -I ../../Dependencies/oni-framework/include -I ../../Dependencies/freebsd-headers/include -imultiarch x86_64-linux-gnu -D _KERNEL -D _DEBUG=1 src/example_plugin.c -quiet -dumpbase example_plugin.c -m64 -mtune=generic -march=x86-64 -auxbase-strip build/src/example_plugin.o -O2 -Wall -Werror=implicit-function-declaration -Wno-unknown-pragmas -std=c11 -version -fno-builtin -fcheck-new -ffreestanding -fno-strict-aliasing -fno-exceptions -fno-asynchronous-unwind-tables -fPIC -o /tmp/ccqXmRLi.s
GNU C11 (Debian 7.3.0-19) version 7.3.0 (x86_64-linux-gnu)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
src
../../Dependencies/oni-framework/include
../../Dependencies/freebsd-headers/include
End of search list.
GNU C11 (Debian 7.3.0-19) version 7.3.0 (x86_64-linux-gnu)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 12baff07501e62a0e90bffe2cbcaf8cf
In file included from ../../Dependencies/oni-framework/include/oni/plugins/plugin.h:2:0,
from src/example_plugin.h:2,
from src/example_plugin.c:1:
../../Dependencies/oni-framework/include/oni/utils/types.h:2:10: fatal error: types.h: No such file or directory
#include <types.h>

solved, but now another error....

Compiling ExamplePlugin...
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.3.0-19' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Debian 7.3.0-19)
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'ExamplePlugin_Orbis.elf' '-L.' '-Llib' '-L../../Dependencies/oni-framework' '-nostdlib' '-T' '../../Dependencies/oni-framework/link.x' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/7/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper -plugin-opt=-fresolution=/tmp/cc3DjTRO.res --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o ExamplePlugin_Orbis.elf -L. -Llib -L../../Dependencies/oni-framework -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. build/src/crt0.o build/src/example_plugin.o --build-id=none -l:OniFramework.a -T ../../Dependencies/oni-framework/link.x
/usr/bin/ld: cannot find -l:OniFramework.a
collect2: error: ld returned 1 exit status
make: *** [Makefile:82: ExamplePlugin_Orbis.elf] Error 1

i supposed to compile OniFramework, and i get errors compiling the framework too....

Compiling src/oni/utils/kernel.c ...
In file included from src/oni/utils/kernel.c:1:
In file included from include/oni/utils/types.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/types.h:365:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/select.h:40:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:19: error: field has incomplete type
'struct timespec'
struct timespec it_interval;
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:60:19: error: field has incomplete type
'struct timespec'
struct timespec it_value;
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:223:5: error: incomplete definition of type
'struct timespec'
_ts->tv_sec = _bt->sec;
~~~^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:224:5: error: incomplete definition of type
'struct timespec'
_ts->tv_nsec = ((uint64_t)1000000000 *
~~~^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:232:16: error: incomplete definition of type
'struct timespec'
_bt->sec = _ts->tv_sec;
~~~^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:234:17: error: incomplete definition of type
'struct timespec'
_bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL;
~~~^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:255:1: error: incomplete result type 'struct timespec'
in function definition
sbttots(sbintime_t _sbt)
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:257:18: error: variable has incomplete type
'struct timespec'
struct timespec _ts;
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:7:
In file included from include/oni/utils/memory/allocator.h:2:
In file included from /home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/param.h:121:
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/time.h:265:25: error: variable has incomplete type
'struct timespec'
tstosbt(struct timespec _ts)
^
/home/sexistduck/OpenOrbis/mira-project/Firmware/Dependencies/freebsd-headers/include/sys/timespec.h:59:9: note: forward declaration of
'struct timespec'
struct timespec it_interval;
^
In file included from src/oni/utils/kernel.c:12:
In file included from ../freebsd-headers//include/sys/proc.h:66:
In file included from ../freebsd-headers//include/sys/_vm_domain.h:34:
In file included from ../freebsd-headers//include/sys/seq.h:32:
In file included from ../freebsd-headers//include/sys/systm.h:46:
../freebsd-headers//include/sys/stdint.h:66:9: error: 'WCHAR_MIN' macro redefined [-Werror,-Wmacro-redefined]
#define WCHAR_MIN __WCHAR_MIN
^
../freebsd-headers//include/machine/_stdint.h:161:9: note: previous definition is here
#define WCHAR_MIN INT32_MIN
^
In file included from src/oni/utils/kernel.c:12:
In file included from ../freebsd-headers//include/sys/proc.h:66:
In file included from ../freebsd-headers//include/sys/_vm_domain.h:34:
In file included from ../freebsd-headers//include/sys/seq.h:32:
In file included from ../freebsd-headers//include/sys/systm.h:46:
../freebsd-headers//include/sys/stdint.h:67:9: error: 'WCHAR_MAX' macro redefined [-Werror,-Wmacro-redefined]
#define WCHAR_MAX __WCHAR_MAX
^
../freebsd-headers//include/machine/_stdint.h:162:9: note: previous definition is here
#define WCHAR_MAX INT32_MAX
^
In file included from src/oni/utils/kernel.c:12:
In file included from ../freebsd-headers//include/sys/proc.h:66:
In file included from ../freebsd-headers//include/sys/_vm_domain.h:34:
../freebsd-headers//include/sys/seq.h:84:2: error: implicit declaration of function 'atomic_thread_fence_rel' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
atomic_thread_fence_rel();
^
../freebsd-headers//include/sys/seq.h:123:2: error: implicit declaration of function 'atomic_thread_fence_acq' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
atomic_thread_fence_acq();
^
../freebsd-headers//include/sys/seq.h:123:2: note: did you mean 'atomic_thread_fence_rel'?
../freebsd-headers//include/sys/seq.h:84:2: note: 'atomic_thread_fence_rel' declared here
atomic_thread_fence_rel();
^
In file included from src/oni/utils/kernel.c:19:
In file included from ../freebsd-headers//include/vm/vm_map.h:70:
../freebsd-headers//include/sys/sx.h:163:7: error: implicit declaration of function 'atomic_fcmpset_acq_ptr' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)))
^
../freebsd-headers//include/sys/sx.h:176:7: error: implicit declaration of function 'atomic_fcmpset_rel_ptr' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
!atomic_fcmpset_rel_ptr(&sx->sx_lock, &x, SX_LOCK_UNLOCKED)))
^
../freebsd-headers//include/sys/sx.h:176:7: note: did you mean 'atomic_fcmpset_acq_ptr'?
../freebsd-headers//include/sys/sx.h:163:7: note: 'atomic_fcmpset_acq_ptr' declared here
!atomic_fcmpset_acq_ptr(&sx->sx_lock, &v, tid)))
^
../freebsd-headers//include/sys/cdefs.h:466:51: note: expanded from macro '__predict_false'
#define __predict_false(exp) __builtin_expect((exp), 0)
^
src/oni/utils/kernel.c:34:8: error: unused variable '_mtx_unlock_flags' [-Werror,-Wunused-variable]
void(*_mtx_unlock_flags)(struct mtx *m, int opts, const char file, int line) = kdlsym(_mtx_unlock_flags);
^
src/oni/utils/kernel.c:94:8: error: unused variable '_mtx_unlock_flags' [-Werror,-Wunused-variable]
void(
_mtx_unlock_flags)(struct mtx *m, int opts, const char file, int line) = kdlsym(_mtx_unlock_flags);
^
src/oni/utils/kernel.c:95:8: error: unused variable '_mtx_lock_flags' [-Werror,-Wunused-variable]
void(
_mtx_lock_flags)(struct mtx *m, int opts, const char *file, int line) = kdlsym(_mtx_lock_flags);
^
src/oni/utils/kernel.c:223:2: error: member reference base type 'struct proclist *' is not a structure or union
FOREACH_PROC_IN_SYSTEM(p) {
^~~~~~~~~~~~~~~~~~~~~~~~~
../freebsd-headers//include/sys/proc.h:806:2: note: expanded from macro 'FOREACH_PROC_IN_SYSTEM'
LIST_FOREACH((p), &allproc, p_list)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../freebsd-headers//include/sys/queue.h:489:15: note: expanded from macro 'LIST_FOREACH'
for ((var) = LIST_FIRST((head));
^~~~~~~~~~~~~~~~~~
../freebsd-headers//include/sys/queue.h:486:33: note: expanded from macro 'LIST_FIRST'
#define LIST_FIRST(head) ((head)->lh_first)
~~~~~~^ ~~~~~~~~
19 errors generated.