I got it to successfully link by adding some lines to the target.mk file
(attached below). I then got some errors / warnings regarding the stdlib. I
fixed that by appending CC_CXX_WARN_STRICT= to the make command.
However, I still cannot compile the program as I get an error that ld.lib.so is
missing even though it is listed as a build dependency in my run file (see
attached log file).
Rumen
________________________________
From: Michael Grunditz <[email protected]>
Sent: Sunday, August 18, 2024 4:18 PM
To: Genode users mailing list <[email protected]>
Subject: Re: ext4.h not found
I see , thanks.
sön 18 aug. 2024 kl. 18:09 skrev Rumen Mitov <[email protected]>:
Hi Michael,
I want to use the ext4.h header to open files on the ext4 filesystem (i.e. with
ext4_fopen) as I am reworking the snapshotting capability of the project I am
working on. The hello world file was just a test to see if everything
(primarily the run file) would compile successfully.
Rumen
________________________________
From: Michael Grunditz
<[email protected]<mailto:[email protected]>>
Sent: Saturday, August 17, 2024 6:43 PM
To: Genode users mailing list
<[email protected]<mailto:[email protected]>>
Subject: Re: ext4.h not found
17 aug. 2024 kl. 19:43 skrev Michael Grunditz
<[email protected]<mailto:[email protected]>>:
16 aug. 2024 kl. 16:42 skrev Rumen Mitov <[email protected]>:
Hello,
I want to test out lwext4, however when I try to compile it, I get an error
that ext4.h was not found. I have attached my main.cc,
target.mk<http://target.mk> and squid.run files below. The platform I am using
is x86_64 linux. If anyone knows has any idea how to link the lwext4 library
please let me know, as I could not find much information online.
Best,
Rumen
Not sure what you want to achieve. Accessing ext4 file systems? Probably a bad
idea in Genode/Linux.
Michael
Sorry didn’t read your run file. Looks fine even though, why include the header
in a hello world file?
Michael
_______________________________________________
users mailing list -- [email protected]<mailto:[email protected]>
To unsubscribe send an email to
[email protected]<mailto:[email protected]>
Archived at
https://lists.genode.org/mailman3/hyperkitty/list/[email protected]/message/KQPDMIL6B5QW2C77B4YC7ZC4TMKTNO2M/
make: Entering directory '/home/rumen/genode/build/x86_64'
including /home/rumen/genode/tool/run/power_on/linux
including /home/rumen/genode/tool/run/log/linux
including /home/rumen/genode/tool/run/boot_dir/linux
including /home/rumen/genode/repos/squid/run/squid.run
building targets: core init timer server/lx_block server/report_rom server/vfs lib/vfs lib/vfs_lwext4 test/libc_vfs lib/ld lib/libc lib/libm lib/posix app/squid
spawn make core init timer server/lx_block server/report_rom server/vfs lib/vfs lib/vfs_lwext4 test/libc_vfs lib/ld lib/libc lib/libm lib/posix app/squid
make[1]: Entering directory '/home/rumen/genode/build/x86_64'
[00;33mLibrary[0m vfs.abi.so
[00;33mLibrary[0m ld.abi.so
[00;33mLibrary[0m base.lib.a
[00;33mLibrary[0m ldso_so_support.lib.a
[00;33mLibrary[0m vfs.lib.so
[00;33mLibrary[0m format.lib.a
[00;33mLibrary[0m lwext4.lib.a
[00;33mLibrary[0m vfs_lwext4.lib.so
[00;33mLibrary[0m syscall-linux.lib.a
[00;33mLibrary[0m base-linux-common.lib.a
[00;33mLibrary[0m timeout.lib.a
[00;33mLibrary[0m startup-linux.lib.a
[00;33mLibrary[0m cxx.lib.a
[00;33mLibrary[0m seccomp.lib.a
[00;33mLibrary[0m base-linux.lib.a
[00;33mLibrary[0m ld-linux.lib.so
[00;33mLibrary[0m ld.lib.so
[00;33mLibrary[0m libc.abi.so
[00;33mLibrary[0m libc-string.lib.a
[00;33mLibrary[0m libc-locale.lib.a
[00;33mLibrary[0m libc-stdlib.lib.a
[00;33mLibrary[0m libc-stdio.lib.a
[00;33mLibrary[0m libc-gen.lib.a
[00;33mLibrary[0m libc-gdtoa.lib.a
[00;33mLibrary[0m libc-inet.lib.a
[00;33mLibrary[0m libc-stdtime.lib.a
[00;33mLibrary[0m libc-regex.lib.a
[00;33mLibrary[0m libc-compat.lib.a
[00;33mLibrary[0m libc-setjmp.lib.a
[00;33mLibrary[0m libc-mem.lib.a
[00;33mLibrary[0m libc-resolv.lib.a
[00;33mLibrary[0m libc-isc.lib.a
[00;33mLibrary[0m libc-nameser.lib.a
[00;33mLibrary[0m libc-net.lib.a
[00;33mLibrary[0m libc-rpc.lib.a
[00;33mLibrary[0m libc-tzcode.lib.a
[00;33mLibrary[0m libc-libkern.lib.a
[00;33mLibrary[0m libc.lib.so
[00;33mLibrary[0m libm.abi.so
[00;33mLibrary[0m libm.lib.so
[00;33mLibrary[0m posix.abi.so
[00;33mLibrary[0m posix.lib.so
[01;33mProgram[0m app/squid/squid
LINK squid
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: warning: ld.lib.so, needed by vfs_lwext4.lib.so, not found (try using -rpath or -rpath-link)
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: main.o: in function `Genode::Log::Log_fn::Log_fn<char const (&) [23]>(char const (&) [23])':
/home/rumen/genode/repos/base/include/base/log.h:84: undefined reference to `Genode::Log::log()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: main.o: in function `void Genode::Log::output<char const (&) [23]>(Genode::Log::Type, char const (&) [23])':
/home/rumen/genode/repos/base/include/base/log.h:69: undefined reference to `Genode::Log::_acquire(Genode::Log::Type)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: main.o: in function `void Genode::Output::out_args<char const (&) [23]>(Genode::Output&, char const (&) [23])':
/home/rumen/genode/repos/base/include/base/output.h:52: undefined reference to `Genode::print(Genode::Output&, char const*)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: main.o: in function `void Genode::Log::output<char const (&) [23]>(Genode::Log::Type, char const (&) [23])':
/home/rumen/genode/repos/base/include/base/log.h:71: undefined reference to `Genode::Log::_release()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Xml_generator::Node::Node(Genode::Xml_generator&, char const*, Genode::Xml_generator::Node::_Fn const&)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Native_capability::Native_capability()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Trace::Logger::_evaluate_control()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `operator delete(void*, Genode::Deallocator&)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Trace::Partitioned_buffer::reserve(unsigned long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::print(Genode::Output&, unsigned long long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Avl_node_base::insert(Genode::Avl_node_base*, Genode::Avl_node_base::Policy&)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Native_capability::_inc()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Mutex::release()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::print(Genode::Output&, long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: posix.lib.so: undefined reference to `main'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Native_capability::valid() const'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Trace::Partitioned_buffer::commit(unsigned long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Avl_node_base::Avl_node_base()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Thread::_logger()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Native_capability::_dec()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `operator new(unsigned long, Genode::Allocator&)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Native_capability::Native_capability()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Avl_node_base::remove(Genode::Avl_node_base::Policy&)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::ipc_call(Genode::Native_capability, Genode::Msgbuf_base&, Genode::Msgbuf_base&, unsigned long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::print(Genode::Output&, unsigned long)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `Genode::Mutex::acquire()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: vfs_lwext4.lib.so: undefined reference to `typeinfo for Genode::Output'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: /usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld generated: undefined reference to `Genode::Log::log()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: /usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld generated: undefined reference to `Genode::Log::_acquire(Genode::Log::Type)'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: /usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld generated: undefined reference to `Genode::Log::_release()'
/usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld: /usr/local/genode/tool/23.05/bin/../lib/gcc/x86_64-pc-elf/12.3.0/../../../../x86_64-pc-elf/bin/ld generated: undefined reference to `Genode::print(Genode::Output&, char const*)'
collect2: error: ld returned 1 exit status
make[3]: *** [/home/rumen/genode/repos/base/mk/prg.mk:214: squid] Error 1
make[2]: *** [var/libdeps:728: squid.prg] Error 2
make[1]: *** [Makefile:351: gen_deps_and_build_targets] Error 2
make[1]: Leaving directory '/home/rumen/genode/build/x86_64'
Error: Genode build failed
make: Leaving directory '/home/rumen/genode/build/x86_64'
TARGET = squid
SRC_CC = main.cc
LIBS = posix vfs_lwext4
INC_DIR += $(call select_from_ports,lwext4)/include
INC_DIR += $(REP_DIR)/src/lib/lwext4/include
CC_OPT += -DCONFIG_USE_DEFAULT_CFG=1
CC_OPT += -DCONFIG_HAVE_OWN_ERRNO=1
CC_OPT += -DCONFIG_HAVE_OWN_ASSERT=1
CC_OPT += -DCONFIG_BLOCK_DEV_CACHE_SIZE=256
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Archived at
https://lists.genode.org/mailman3/hyperkitty/list/[email protected]/message/EG7OTZ322V57HOPRUPJ2VC4AHAVKYEHI/