bme680_i2c: Unknown symbol __devm_regmap_init_i2c (err -2) - linux-kernel

I am trying to build bme680 driver for raspberry pi 3. In compiling process, every is well without any error. But when I insmod the driver, I received an error:
insmod: ERROR: could not insert module bme680_i2c.ko: Unknown symbol in module
Check dmesg log, I found the error:
[ 96.011927] bme680_i2c: Unknown symbol __devm_regmap_init_i2c (err -2)
grep -nrwI __devm_regmap_init_i2c, I saw this function declared in include/linux/regmap.h header file but there is no a definition for this function anywhere in source code.
In addition, I saw this function is exported with GPL license:
Module.symvers:10646:0x8037c97f __devm_regmap_init_i2c drivers/base/regmap/regmap-i2c EXPORT_SYMBOL_GPL
And the driver has MODULE_LICENSE("GPL v2") also.
Now, I don't know where this error comes from and how to resolve it, Can anyone help me? Thanks !!!

Related

PTHREAD_STACK_MIN causing problem in compiling buildroot

i'm trying to compile a Linux image with sysroot and cross-compiler by buildroot for ATSAMA5D27-WLSOM1 evaluation kit by Microchip.
I'm on a virtual machine (VBox) with Ubuntu 18.04.5 LTS.
I'm following this guide: https://microchip.wikidot.com/32mpu:egt-prepare#prepHost
I arrived at point 6, but there are some errors in compilation, the one I can't solve is the following one:
In file included from /home/ubuntu4sam/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.3.0/include-fixed/pthread.h:42,
from work_thread.c:13:
work_thread.c:45:58: error: missing binary operator before token "("
45 | #if defined (PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
| ^~~~~~~~~~~~~~~~~
I tried to comment the second condition (THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN) and the error becomes:
work_thread.c:45:58: error: missing binary operator before token "("
45 | #if defined (PTHREAD_STACK_MIN)
so the problem must be PTHREAD_STACK_MIN. I hope someone else has worked on Microchip boards.
Thanks for reading.

SynCrypto.pas and Lazarus compile problem

I'm trying to use SynCrypto.pas (part of Synopse mORMot ORM/SOA/MVC framework) in my Lazarus project to decrypt AES-128 stream. My project not compiling with errors in SynFPCTypInfo at this code:
PFPCInterfaceData = TypInfo.PInterfaceData;
PFPCVmtMethodParam = TypInfo.PVmtMethodParam;
PFPCIntfMethodTable = TypInfo.PIntfMethodTable;
PFPCIntfMethodEntry = TypInfo.PIntfMethodEntry;
SynFPCTypInfo.pas(91,31) Error: Identifier not found "PInterfaceData"
SynFPCTypInfo.pas(91,45) Error: Error in type definition
SynFPCTypInfo.pas(92,32) Error: Identifier not found "PVmtMethodParam"
SynFPCTypInfo.pas(92,47) Error: Error in type definition
SynFPCTypInfo.pas(93,33) Error: Identifier not found "PIntfMethodTable"
SynFPCTypInfo.pas(93,49) Error: Error in type definition
SynFPCTypInfo.pas(94,33) Error: Identifier not found "PIntfMethodEntry"
SynFPCTypInfo.pas(94,49) Error: Error in type definition
I think that it's incompatibility with Delphi TypInfo module. How can I fix it?
So ... I suggest you to install the new pascal: https://github.com/newpascal/newpascal/releases/tag/np-v1.0.56, download the zip and unzip it in some folder, for example (D: \ lazarus \ newpascal), and configure the paths according to the mORMot site: For proper FPC compilation, ensure you have the following settings to your project:
Other unit files (-Fu):
D:\lazarus\newpascal\ccr\mORMot;D:\lazarus\newpascal\ccr\mORMot\SQLite3;D:\lazarus\newpascal\ccr\mORMot\SQLite3\DDD\infra\
Include files (-Fi):
$(ProjOutDir);D:\lazarus\newpascal\ccr\mORMot;D:\lazarus\newpascal\ccr\mORMot\SQLite3\
Libraries (-fFl):
D:\lazarus\newpascal\ccr\mORMot\static$(TargetCPU)-$(TargetOS)\
site: https: //synopse.info/files/html/Synopse%20mORMot%20Framework%20SAD%201.18.html#TITL_113, then you will have at least how to test your app.

cmake and make unable to compile YAP in Fedora 23

This is kind of a specific question, but, I am unable to get cmake and make to compile Yet Another Prolog in Fedora 23. Cloned the latest repo on Github, YAP 6.3.4. My friend ran cmake and make successfully on the identical clone on his Funtoo Linux. When I run them on Fedora 23, I get weird errors that would only make sense if CUDD headers were missing, but CUDD is installed with the header files.
I hope anyone has enough experience to offer a reason why a cmake-generated Makefile would fail to compile in one Linux system while compiling on another.
Here is a sample of the make errors (Makefile made with cmake with no errors). The "unknown" type name is in CUDD headers which are installed on my system. The source file cplint is supposed to be built using CUDD
% YAP 6.3.4-76638bb7 (compiled 2016-09-01T01:01:57#dhcp-129-8-62-64)
In file included from /home/safulop/yap-6.3/packages/cplint/cplint_yap.c:15:0:
/home/safulop/yap-6.3/packages/cplint/cplint.h:41:3: error: unknown type name ‘DdNode’
DdNode * * booleanVars;
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:54:3: error: unknown type name ‘DdNode’
DdNode *key;
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:64:33: error: unknown type name ‘DdManager’
variables createVars(YAP_Term t,DdManager * mgr, int create_dot,
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:69:1: error: unknown type name ‘DdNode’
DdNode * retFunction(DdManager * mgr, expr expression,variables v);
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:69:22: error: unknown type name ‘DdManager’
DdNode * retFunction(DdManager * mgr, expr expression,variables v);
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:70:1: error: unknown type name ‘DdNode’
DdNode * retTerm(DdManager * mgr,term t,variables v);
^
As you said, the problem cames from the CUDD library. You need to fix the include directory folders of CUDD in the Makefile...

Can't compile CapacitiveSensor example in Arduino

I am trying to use the Capacitive Sensors Library from the Arduino Playground with Arduino 1.5.3 for Intel Galileo.
While trying to compile the example Sketch of the library with nothing touched I get the following error:
Arduino: 1.5.3 (Windows 7), Board: "Intel® Galileo"
CapacitiveSensor.cpp: In constructor
'CapacitiveSensor::CapacitiveSensor(uint8_t, uint8_t)':
CapacitiveSensor.cpp:30:63: error: 'F_CPU' was not declared in this
scope CapacitiveSensor.cpp:43:10: error: 'PinDescription' has no
member named 'ulPin' CapacitiveSensor.cpp:44:10: error:
'PinDescription' has no member named 'pPort'
CapacitiveSensor.cpp:45:31: error: 'portModeRegister' was not declared
in this scope CapacitiveSensor.cpp:46:9: error: base operand of '->'
is not a pointer CapacitiveSensor.cpp:48:9: error: 'PinDescription'
has no member named 'ulPin' CapacitiveSensor.cpp:49:10: error:
'PinDescription' has no member named 'pPort'
CapacitiveSensor.cpp:51:9: error: base operand of '->' is not a
pointer CapacitiveSensor.cpp:52:12: error: base operand of '->' is not
a pointer CapacitiveSensor.cpp:55:18: error: 'noInterrupts' was not
declared in this scope CapacitiveSensor.cpp:57:16: error: 'interrupts'
was not declared in this scope CapacitiveSensor.cpp: In member
function 'void CapacitiveSensor::set_CS_Timeout_Millis(long unsigned
int)': CapacitiveSensor.cpp:133:73: error: 'F_CPU' was not declared in
this scope CapacitiveSensor.cpp: In member function 'int
CapacitiveSensor::SenseOneCycle()': CapacitiveSensor.cpp:141:18:
error: 'noInterrupts' was not declared in this scope
CapacitiveSensor.cpp:151:16: error: 'interrupts' was not declared in
this scope
I downloaded the files and imported the "CapacitiveSensor"-Folder into (I did those steps one after the other, not at the same time.):
The libraries folder under Documents/arduino/.
The libraries folder in the arduino folder where the arduino.exe is stored.
Onto arduino-1.5.3/hardware/libraries/ (because this is mentioned on the site where I downloaded it)
And I tried this: Here Because it seemed to be the same error as I had. But it didnt work.
I also deleted my Arduino and reinstalled it.
Anyone has an Idea?
Thanks in advance,
Clemens
There is a similar question on the Arduino forum but I don't know if your issue is exactly the same: [FIXED][CapacitiveSensor] Can't compile with Due (port manipulation)
It doesn't look like the Arduino folks are very responsive. The user modified register names and eventually put his own library out there.
*"...changed the uint8_t registers to RwReg (compiler doesn't complain) and I replaced the use of portModeRegister(PIN) with simple pinMode(PIN, MODE) calls (it's slower but it works)."*

UPC error when running (reason: unable to open any HCA ports)

I just started learning UPC and I'm getting the following error when running an hello world example:
GASNet gasnetc_init returning an error code: GASNET_ERR_RESOURCE (Problem with requested resource)
at /home/dx/Downloads/berkeley_upc-2.14.2/gasnet/vapi-conduit/gasnet_core.c:1422
reason: unable to open any HCA ports
Here's the code:
#include <upc_relaxed.h>
#include <stdio.h>
int main() {
printf("Hello from thread %i/%i\n", MYTHREAD, THREADS);
upc_barrier;
return 0;
}
it was compiled with:
/usr/local/upc/opt/bin/upcc upcTest.upc -o up
and executed with:
/usr/local/upc/opt/bin/upcrun -n 1 up
When compiling I also got this error:
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
Any idea on how to solve the problem?
Thanks in advance!
HCA stands for Host Channel Adapter which is just the technical term for adapters for various network types, most notably for InfiniBand. If your system is not InifiniBand enabled then no HCAs are present. If this is the case you should be using another network type, e.g. udp if runing on a cluster with Ethernet-only connectivity or smp if running on a single multicore/multisocket node.
The network type is specified by the -network=<type> option to upcc. Run upcc -version to get the list of available network types and read the docs to see which one can be used on the hardware you have.

Resources