DTN in OpenEmbedded for BeagleBoard - arm

I'm trying to build the DTN using OpenEmbedded. Unfortunately, DTN
uses Tcl 8.3 or 8.4 and DB 4.2, 4.3, 4.4 or 4.5, but bitbake is using
Tcl 8.5 and DB 5.0.
In the OpenEmbedded recipes directory, among other other files there exists:
db/
db/db_4.3.29.bb
db/db4-native.inc
db/db3-native_3.2.9.bb
db/db_5.0.21.bb
db/db3-3.2.9
db/db4.inc
db/files
db/db-native_4.3.29.bb
db/db3_3.2.9.bb
db/db-native_5.0.21.bb
db/db5.inc
tcltk/
tcltk/tk
tcltk/tk_8.4.19.bb
tcltk/tcl-native_8.4.19.bb
tcltk/tk-8.5.8
tcltk/tk-native_8.4.19.bb
tcltk/tk_8.5.8.bb
tcltk/files
tcltk/tcl
tcltk/tcl-8.5.8
tcltk/tcl_8.5.8.bb
tcltk/tcl_8.4.19.bb `
At some point when the bitbake was configuring the dtn, the following happens:
| checking for library containing pow... -lm
| checking for library containing dlopen... -ldl
|
| configure: checking for tcl installation (version 8.4)
| checking for tcl.h (version 8.4) in /opt/OpenEmbedded/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi usr/include... no
|
| configure: checking for tcl installation (version 8.3)
| checking for tcl.h (version 8.3) in /opt/OpenEmbedded/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include... no
| configure: error: can't find usable tcl.h
NOTE: Task failed: /opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/temp/log.do_configure.27117
ERROR: TaskFailed event exception, aborting
ERROR: Build of /opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb do_configure failed
ERROR: Task 11 (/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb, do_configure) failed
NOTE: Tasks Summary: Attempted 897 tasks of which 883 didn't need to be rerun and 1 failed.
ERROR: '/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb' failed `
To solve this I went to the dtn_2.5.0.bb and added --with-tclver=8.5.
The same thing happened with DB and to solve it again I did the same thing.
After a while, when bitbake was compiling the following happened:
| In file included from storage/BerkeleyDBStore.cc:35:
| storage/BerkeleyDBStore.h:31:2: error: #error "must use Berkeley DB major version 4"
| In file included from /opt/OpenEmbedded/build/tmp/sysroots/i686-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../
arm-angstrom-linux-gnueabi/include/c++/4.3.3/ext/hash_set:64,
| from storage/../util/StringUtils.h:39,
| from storage/DurableStore.h:35,
| from storage/BerkeleyDBStore.h:39,
| from storage/BerkeleyDBStore.cc:35:
| /opt/OpenEmbedded/build/tmp/sysroots/i686-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.3.3/backward/backward_warning.h:33:2: warning:
warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date.
Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
| storage/BerkeleyDBStore.cc: In member function 'virtual int oasys::BerkeleyDBStore::init(const oasys::StorageConfig&)':
| storage/BerkeleyDBStore.cc:129: warning: invalid conversion from 'void ()(const char, char*)' to 'void ()(const DB_ENV, const char*, const char*)'
| storage/BerkeleyDBStore.cc:187: error: 'DB_LOG_AUTOREMOVE' was not declared in this scope
| make1: *** [storage/BerkeleyDBStore.o] Error 1
| make1: Leaving directory ``/opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/dtn-2.5.0/oasys'
| make: * [oasys] Error 2
| FATAL: oe_runmake failed
NOTE: Task failed: /opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/temp/log.do_compile.5339
ERROR: TaskFailed event exception, aborting
ERROR: Build of /opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb do_compile failed
ERROR: Task 13 (/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 913 tasks of which 913 didn't need to be rerun and 1 failed.
ERROR: '/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb' failed `
So, is there any way to 'tell' bitbake or OpenEmbedded to use a version selected by me?

You specify versions of packages in the BOM.

Related

How can I get Shake to print errors only once?

If I ever have an error during a build, I see it twice
# ghc (for _build/lib/WCLoan.o)
# ghc (for _build/lib/WCLoan.o)
[2 of 2] Compiling WCLoan ( src/WCLoan.hs, _build/lib/WCLoan.o )
src/WCLoan.hs:18:1: error:
Parse error: module header, import declaration
or top-level declaration expected.
|
18 | imAnError
| ^^^^^^^^^
Error when running Shake build system:
* _build/lib/WCLoan.o
user error (Development.Shake.cmd, system command failed
Command: ghc -this-unit-id wcloan-0.0.1 src/WCLoan.hs -outputdir_build/lib -isrc:app:test -dynamic-too -O2 -j12 -fPIC -Werror -Wall -package-name wcloan-0.0.1 '-package base
-4.12.0.0' '-package calc-0.0.1' '-package vector-0.12.0.3'
Exit code: 1
Stderr:
src/WCLoan.hs:18:1: error:
Parse error: module header, import declaration
or top-level declaration expected.
|
18 | imAnError
| ^^^^^^^^^
)
I see that the error occurs during build, then is also shown under the line
Error when running Shake build system:
Is there anything I can do to have it show only once?
The error messages are coming from two distinct locations:
The first one is being printed by a command that Shake runs and writes to stderr with an error message. When you do cmd ... Shake defaults to EchoStderr True (print out the stderr stream to the console), but you can pass EchoStderr False to not echo the stderr.
The second is an exception being bubbled up by Haskell, as a ShakeException, which then gets printed out at the end, and includes the stderr. When you do cmd ... Shake defaults to WithStderr True to include the stderr in the exception, and you can pass WithStderr False to not include the stderr in the exception.
However, because of the way Shake works, you may find that the error message comes out quite a long way before the end of the full Shake command. Therefore, I recommend leaving WithStderr as it is, if you do want to see stderr only once.

Error build when linux kernel driver is configured as builtin

I have developed 2 kernel drivers and I can build them using yocto as dynamic kernel modules without any probem but when I need to build them as static I had some issue related to dependency, because my driver1 is used by driver2.
Here is the issue:
| drivers/built-in.o: In function `init_module':
| mydriver2.c:(.init.text+0xd474): undefined reference to `__this_module'
| drivers/built-in.o: In function `mydriver_two_init':
| mydriver2.c:(.init.text+0xd53c): undefined reference to `my_driver_fn'
| /bsp/build/tmp/work-shared/bsp/kernel-source/Makefile:1003: recipe for target 'vmlinux' failed
| make[2]: *** [vmlinux] Error 1
| Makefile:152: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
In my driver1 I have developed a function that it is exported using EXPORT_SYMBOL(my_driver_fn);
and this function is used in driver2.
I have tried to Kconfig file but error still exist :
Kconfig file :
menu "personal Driver "
comment "Personal driver Config"
config DRIVER_ONE
bool "driver 1"
default y
help
driver 1
config DRIVER_TWO
bool "driver 2"
depends on DRIVER_ONE
default y
help
driver 2
endmenu
folder tree :
linux-sources
\----->drivers (Makefile updated with obj-$(CONFIG_DRIVER_ONE) += driver_one/ and obj-$(CONFIG_DRIVER_TWO) += driver_two/)
|------------->personaldrivers
\--->Kconfig
\--->driver_one----contains---> mydriver1.c and Makefile (obj-$(CONFIG_DRIVER_ONE) = mydriver1.o)
\--->driver_two----contains---> mydriver2.c and Makefile(obj-$(CONFIG_DRIVER_TWO) = mydriver2.o)

I get an error when trying to bundle install

gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
/usr/share/rvm/rubies/ruby-2.3.8/bin/ruby -I /usr/share/rvm/rubies/ruby-2.3.8/lib/ruby/site_ruby/2.3.0 -r ./siteconf20210223-17291-11rjqor.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting libpath to /usr/lib/x86_64-linux-gnu
-----
creating Makefile
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR=" clean
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling client.c
client.c: In function 'nogvl_read_query_result':
client.c:439:3: error: unknown type name 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c: In function '_mysql_client_options':
client.c:762:3: error: unknown type name 'my_bool'
my_bool boolval;
^
client.c:797:10: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
case MYSQL_SECURE_AUTH:
^
client.c:797:10: note: each undeclared identifier is reported only once for each function it appears in
client.c: In function 'set_secure_auth':
client.c:1185:38: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^
client.c:1186:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Makefile:239: client.o] Error 1
make failed, exit code 2
This is the whole error I get.
Does anyone know how to fix this.
The previous threads are old/ the solutions for them didn't work.
I tried:
sudo apt-get install ruby-mysql
and got:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby-mysql
https://github.com/brianmario/mysql2
as mentioned here you need to install a few Linx packages first before installing the gem

Getting error while compiling in keil?

I am working with MK60N512MD100 (TWR-K60N512 tower kit) I am trying to extract Freescale_USB_Stack_v4.1.1 and creating my own project, But I am getting following error even after I copied all related files.
***********************error LOG ************************
> main_kinetis.c: 5 warnings, 0 errors linking... .\USB_DEV.axf:
> Warning: L6304W: Duplicate input file .\startup_mk60n512md100.o
> ignored. .\USB_DEV.axf: Error: L6320W: Ignoring --entry command.
> Cannot find argument 'Reset_Handler'. .\USB_DEV.axf: Warning: L6320W:
> Ignoring --first command. Cannot find argument '__Vectors'. Not enough
> information to list image symbols. Not enough information to list the
> image map. Finished: 2 information, 2 warning and 1 error messages.
> ".\USB_DEV.axf" - 1 Error(s), 7 Warning(s). Target not created
Please help me in resolving this issue.

bitbake fails on "bitbake nano"

I am trying to setup bitbake and openembedded in order to cross-compile code for angstrom 2009.x on devkit8000 (a beagleboard's clone). I have followed this page but when I try
$ bitbake nano
I get
Loading cache: 100% |##############################################################################################################################################################################################| Time: 00:00:00
Loaded 1 entries from dependency cache.
ERROR: Error parsing /home/hnsl/stuff/openembedded/recipes/images/initramfs-kexecboot-image.bb: Could not inherit file classes/rootfs_${IMAGE_PKGTYPE}.bbclass | ETA: --:--:--
ERROR: Command execution failed: Exited with 1
Apparently it seems that I need to change version of Angstrom. Using
"DISTRO="angstrom-2010.x"
on stuff/build/conf/local.conf resolves this issue.

Resources