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)
Related
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
I'm trying to send an email in c. I want to use libcurl for that. But before i need to understand how it's working.
So i download curl-7.63.0.zip and MinGW32.
After installing MinGW, i select all the basic package :
mingw-developper-toolkit-bin
mingw32-base-bin
mingw32-gcc-fortran-bi
mingw32-gcc-g++-bin
mingw32-gcc-objc-bin msys-base-bin
In next, i have extracted all the files to a folder and i run a cmd to write
\>cd "something\curl-7.63.0"
\>mingw32-make mingw32-ssl
But i recieve an error :
\>D:\Projets_Info\Emails\Méthode n°8 Libcurl\drivers\curl-7.63.0>mingw32-make mingw32-ssl
mingw32-make -C lib -f Makefile.m32 CFG=mingw32-ssl
mingw32-make[1]: Entering directory 'D:/Projets_Info/Emails/Méthode n°8
Libcurl/drivers/curl-7.63.0/lib'
Makefile.m32:257: *** Invalid path to OpenSSL package: ../../openssl-1.0.2a. Stop.
mingw32-make[1]: Leaving directory 'D:/Projets_Info/Emails/Méthode n°8 Libcurl/drivers/curl-7.63.0/lib'
Makefile:61: recipe for target 'mingw32-ssl' failed
mingw32-make: *** [mingw32-ssl] Error 2
Does anyone has an idea ? An idea that permit me to have curl with ssl
Currently I run a freenas jail so I can compile my c code, that uses some POSIX functions. The jail is fresh, all I did was enable SSH and 'pkg install gcc'. However I get the following error:
1>Starting remote build
1>Compiling sources:
1>main.c
1>cc1 : warning : command line option '-fthreadsafe-statics' is valid for C++/ObjC++ but not for C
1>cc1 : warning : command line option '-frtti' is valid for C++/ObjC++ but not for C
1>Linking objects
1>/usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd11.1/6.4.0/../../../libstdc++.so : error : undefined reference to `__cxa_thread_atexit_impl#FBSD_1.5'
1>collect2 : error : ld returned 1 exit status
1>Done building project "testingdesktop.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I don't have a clue what's going on, something is missing but I am not sure why.
I have the latest (as of 5/1/2013) SDK and Simulator installed (10.1.0.1483).
I have also downloaded the samples from github and unzipped on my PC.
Here are the steps I take in attempt to launch a sample application:
I Launch the Simulator and select the (2) option for BB10 All-Touch
I Launch the Momentics IDE
File -> Import -> BlackBerry (Existing Code...) -> Next ->
Code Location: C:\Users\Michal\Documents\Cascades-Samples-master\hellocascades
Language: C++
-> Finish
In Project Explorer -> right-click hellocascades -> Build Configurations -> Set Active -> 5-Simulator-Debug
I press the arrow next to the green 'Run As' button -> Run Configurations -> Launch Group -> BlackBerry C++ Application (hellocascades-Simulator-Debug appears in the dropdown) -> Add New Target (In the Main Tab) -> Auto-Discover (I choose the IP address of the simulator) -> Finish ->
I highlight the IP address in the Target Options -> Apply -> Close
In Project Explorer -> right-click hellocascades -> Build Project
**** Build of configuration Simulator-Debug for project hellocascades ****
make -j4 Device-Debug
make -C .//translations -f Makefile update
make1: Entering directory C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations'
C:/bbndk/host_10_1_0_212/win32/x86/usr/bin/lupdate hellocascades.pro
Updating 'hellocascades.ts'...
Found 1 source text(s) (0 new and 1 already existing)
Updating 'hellocascades_en_GB.ts'...
Found 1 source text(s) (0 new and 1 already existing)
Updating 'hellocascades_fr.ts'...
Found 1 source text(s) (0 new and 1 already existing)
Updating 'hellocascades_it.ts'...
Found 1 source text(s) (0 new and 1 already existing)
Updating 'hellocascades_de.ts'...
Found 1 source text(s) (0 new and 1 already existing)
Updating 'hellocascades_es.ts'...
Found 1 source text(s) (0 new and 1 already existing)
make[1]: Leaving directoryC:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations'
make -C .//translations -f Makefile release
make1: Entering directory C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations'
C:/bbndk/host_10_1_0_212/win32/x86/usr/bin/lrelease hellocascades.pro
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades_en_GB.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades_fr.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades_it.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades_de.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
Updating 'C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations/hellocascades_es.qm'...
Generated 1 translation(s) (0 finished and 1 unfinished)
make[1]: Leaving directoryC:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/translations'
make -C ./arm -f Makefile debug
make1: Entering directory C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/arm'
make -f Makefile.Debug
make[2]: Entering directoryC:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/arm'
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_1_0_1483/qnx6/armle-v7/lib -Wl,-rpath-link,C:/bbndk/target_10_1_0_1483/qnx6/armle-v7/usr/lib -Wl,-rpath-link,C:/bbndk/target_10_1_0_1483/qnx6/armle-v7/usr/lib/qt4/lib -o o.le-v7-g/hellocascades -LC:/bbndk/target_10_1_0_1483/qnx6/armle-v7/lib -LC:/bbndk/target_10_1_0_1483/qnx6/armle-v7/usr/lib -LC:/bbndk/target_10_1_0_1483/qnx6/armle-v7/usr/lib/qt4/lib -LC:/bbndk/target_10_1_0_1483/qnx6//usr/lib/qt4/lib -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
cc: no files to process
make[2]: Leaving directory C:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/arm'
make[2]: *** [o.le-v7-g/hellocascades] Error 1
make[1]: Leaving directoryC:/Users/Michal/Documents/Cascades-Samples-master/hellocascades/arm'
make1: * [debug] Error 2
make: * [Device-Debug] Error 2
**** Build Finished ****
After trying to run it (Green button -> Run hellocascades-Simulator-Debug):
The program file specified in the launch configuration does not exist
C:\Users\Michal\Documents\Cascades-Samples-master\hellocascades\x86\o-g\hellocascades not found
I am able to get the hellocascades project built and running/deployed on the BlackBerry Simulator.
Perform step 1 as your outlined.
For your step 2 try:
File -> Import -> General (Existing Projects into Workspace) -> Next ...
Browse for the 'hellocascades' project folder -> Finish
Once you have the project imported into the IDE, follow your step 3:
In Project Explorer -> right-click hellocascades -> Build Configurations -> Set Active -> 5-Simulator-Debug
and then..
In Project Explorer -> right-click hellocascades -> Build Project
Continue on with your step 4 and click on 'Run' within the 'Run Configurations' environment after you have inputted the proper settings/fields.
After you click on 'Run' the application is automatically built and deployed over to the BlackBerry simulator
In order to fix this problem in subsequent projects, do git diff between the two commits which were working and the first broken commit. From the DIFF file, figure out the classes added to the project. Make sure that for every class, the corresponding library is added in the .pro file.
For example
If a class under the bb/system directory is added, make sure to include LIBS += -lbbsystem in your .pro file
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.