Raspberry Pi 3 B+ Setup Issue: "error: ‘TLSv1_method’ is deprecated" - azure

I am setting up a Raspberry Pi 3 B+ and connecting it to an IoT hub on Azure by following the instructions in the manual below:
https://azure.microsoft.com/en-us/resources/samples/iot-hub-c-raspberrypi-getstartedkit/
After attempting to build the updated sample solution in step 1.6, the Raspberry Pi's terminal displays this (as the build fails to complete):
[ 59%] Building C object azure-iot-sdks/c/azure-c-shared-utility/CMakeFiles/aziotsharedutil.dir/src/x509_openssl.c.o
/home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c: In function ‘create_openssl_instance’:
/home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c:713:5: error: ‘TLSv1_method’ is deprecated [-Werror=deprecated-declarations]
tlsInstance->ssl_context = SSL_CTX_new(TLSv1_method());
^~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from /home/pi/iot-hub-c-raspberrypi-getstartedkit/azure-iot-sdks/c/azure-c-shared-utility/src/tlsio_openssl.c:9:
/usr/include/openssl/ssl.h:1612:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /*
TLSv1.0 */
^
cc1: all warnings being treated as errors
azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/build.make:950: recipe for target 'azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/src/tlsio_openssl.c.o' failed
make[2]: *** [azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/src/tlsio_openssl.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 60%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_registrymanager.c.o
[ 61%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_messaging_ll.c.o
CMakeFiles/Makefile2:1042: recipe for target 'azure-iot-sdks/c/azure-
c-shared-utility/CMakeFiles/aziotsharedutil.dir/all' failed
make[1]: *** [azure-iot-sdks/c/azure-c-shared-
utility/CMakeFiles/aziotsharedutil.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 62%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/src/iothub_service_client_auth.c.o
[ 62%] Building C object azure-iot-sdks/c/iothub_service_client/CMakeFiles/iothub_service_client.dir/__/iothub_client/src/iothub_message.c.o
[ 63%] Linking C static library libiothub_service_client.a
[ 63%] Built target iothub_service_client
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I am unable to get past this error. Any help would be greatly appreciated. Thanks.

Related

Qt 5.5.1 compiling on Archlinux results with error: this use of "defined" may not be portable [-Wexpansion-to-defined]

I need to compile qt-5.5 for building various applications.
Qt provides instruction to accomplish this here , but following the steps provided, results in a make error.
Note: I attempted searching for a solution of this make warning without success, however, may be someone else experienced this problem.
System used:
Archlinux (Linux arch-desktop 4.9.77-1-lts #1 SMP Wed Jan 17 12:59:05 CET 2018 x86_64 GNU/Linux)
Qt 5.5.1
OpenSSL 1.0.2g
GCC (GCC) 7.2.1 20171224
Steps taken:
OS Installation:
During ArchLinux installation, I installed development packages with pacstrap /mnt/point/here base base-devel, see this for more info
Post Installation:
Downloaded Qt 5.5.1 from here
Downloaded appropriate OpenSSL 1.0.2g (same found in Ubuntu distributions as this is my target platform) found here
Installing this OpenSSL version will break dependencies, so I extracted it to /opt/lib/openssl/, and placed the lib, bin, share folders in the root folder mentioned above.
extracted Qt-5.5.1
ran OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1
(This sets the openssl library location to use for configuring. Then I link the openssl libraries and configure Qt-5.5.1 to install to /opt/qt-5.5.1)
This results in an appropriate output of abilities which Qt will have once installed, amongst which OpenSSL is found
Finally, makeing with
- make -j 8
This takes a while eventually throwing the error:
In file included from ../../include/QtCore/qlist.h:1:0,
from ../../include/QtCore/../../src/corelib/kernel/qobject.h:43,
from ../../include/QtCore/qobject.h:1,
from ../../include/QtCore/../../src/corelib/io/qiodevice.h:39,
from ../../include/QtCore/qiodevice.h:1,
from io/qfiledevice.h:37:
../../include/QtCore/../../src/corelib/tools/qlist.h:169:1: error: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:2660: .obj/header_qtextcodec.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:2436: .obj/header_qsequentialanimationgroup.o] Error 1
make[3]: *** [Makefile:3127: .obj/header_qlibraryinfo.o] Error 1
make[3]: *** [Makefile:1855: .obj/header_qabstractanimation.o] Error 1
make[3]: *** [Makefile:1964: .obj/header_qanimationgroup.o] Error 1
make[3]: *** [Makefile:2075: .obj/header_qparallelanimationgroup.o] Error 1
make[3]: *** [Makefile:2186: .obj/header_qpauseanimation.o] Error 1
make[3]: *** [Makefile:2573: .obj/header_qvariantanimation.o] Error 1
make[3]: *** [Makefile:2325: .obj/header_qpropertyanimation.o] Error 1
make[3]: *** [Makefile:3714: .obj/header_qbuffer.o] Error 1
make[3]: *** [Makefile:3825: .obj/header_qdatastream.o] Error 1
make[3]: *** [Makefile:4202: .obj/header_qdiriterator.o] Error 1
make[3]: *** [Makefile:4079: .obj/header_qdir.o] Error 1
make[3]: *** [Makefile:4313: .obj/header_qfile.o] Error 1
make[3]: *** [Makefile:4422: .obj/header_qfiledevice.o] Error 1
make[3]: *** [Makefile:3958: .obj/header_qdebug.o] Error 1
make[3]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib'
make[2]: *** [Makefile:142: sub-corelib-make_first] Error 2
make[2]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase/src'
make[1]: *** [Makefile:46: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase'
make: *** [Makefile:73: module-qtbase-make_first] Error 2
If you suspect that the fancy 'tricks' using OpenSSL may be causing the problem. No, since I tried it using my OpenSSL-1.1 install which resulted in the same issue. The older OpenSSL version is to be compatible with the older Qt version (still supported in Ubuntu systems)
Any thoughts on what may cause the problem?
UPDATE
After apply the suggested change, as mentioned by #ssbssa, I was able to proceed further with compiling, but still ran into an issue.
I used the following configure command on a fresh source extract:
OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1
I received the following error output.
//...
g++ -o .obj/moc_qopengltimerquery.o .moc/moc_qopengltimerquery.cpp
In file included from ../../include/QtCore/qcontiguouscache.h:1:0,
from ../../include/QtCore/../../src/corelib/io/qdebug.h:46,
from ../../include/QtCore/qdebug.h:1,
from ../../include/QtGui/../../src/gui/math3d/qgenericmatrix.h:38,
from ../../include/QtGui/qgenericmatrix.h:1,
from ../../include/QtGui/../../src/gui/math3d/qquaternion.h:37,
from ../../include/QtGui/qquaternion.h:1,
from ../../include/QtGui/../../src/gui/math3d/qmatrix4x4.h:39,
from ../../include/QtGui/qmatrix4x4.h:1,
from .moc/../opengl/qopenglshaderprogram.h:45,
from .moc/moc_qopenglshaderprogram.cpp:9:
../../include/QtCore/../../src/corelib/tools/qcontiguouscache.h:99:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../include/QtCore/qcontiguouscache.h:1:0,
from ../../include/QtCore/../../src/corelib/io/qdebug.h:46,
from ../../include/QtCore/qdebug.h:1,
from ../../include/QtGui/../../src/gui/math3d/qgenericmatrix.h:38,
from ../../include/QtGui/qgenericmatrix.h:1,
from ../../include/QtGui/../../src/gui/math3d/qquaternion.h:37,
from ../../include/QtGui/qquaternion.h:1,
from ../../include/QtGui/../../src/gui/math3d/qmatrix4x4.h:39,
from ../../include/QtGui/qmatrix4x4.h:1,
from ../../include/QtGui/../../src/gui/opengl/qopenglshaderprogram.h:45,
from ../../include/QtGui/qopenglshaderprogram.h:1,
from ../../include/QtGui/QOpenGLShader:1,
from .moc/../opengl/qopenglengineshadermanager_p.h:217,
from .moc/moc_qopenglengineshadermanager_p.cpp:9:
../../include/QtCore/../../src/corelib/tools/qcontiguouscache.h:99:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
rm -f libQt5Gui.so.5.5.1 libQt5Gui.so libQt5Gui.so.5 libQt5Gui.so.5.5
g++ -Wl,--no-undefined -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/opt/qt-5.5.1/lib -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/gui/QtGui.dynlist -Wl,-soname,libQt5Gui.so.5 -o libQt5Gui.so.5.5.1 .obj/qimage_ssse3.o .obj/qdrawhelper_ssse3.o .obj/qimage_sse4.o .obj/qdrawhelper_sse4.o .obj/qimagescale_sse4.o .obj/qimage_avx2.o .obj/qdrawhelper_avx2.o .obj/qimage_compat.o .obj/qaccessible.o .obj/qaccessiblecache.o .obj/qaccessibleobject.o .obj/qaccessibleplugin.o .obj/qplatformaccessibility.o .obj/qaccessiblebridge.o .obj/qgenericpluginfactory.o .obj/qgenericplugin.o .obj/qwindowsysteminterface.o .obj/qplatforminputcontextfactory.o .obj/qplatforminputcontextplugin.o .obj/qplatforminputcontext.o .obj/qplatformintegration.o .obj/qplatformdrag.o .obj/qplatformscreen.o .obj/qplatformintegrationfactory.o .obj/qplatformintegrationplugin.o .obj/qplatformtheme.o .obj/qplatformthemefactory.o .obj/qplatformthemeplugin.o .obj/qplatformwindow.o .obj/qplatformoffscreensurface.o .obj/qplatformcursor.o .obj/qplatformclipboard.o .obj/qplatformnativeinterface.o .obj/qsessionmanager.o .obj/qshapedpixmapdndwindow.o .obj/qsimpledrag.o .obj/qsurfaceformat.o .obj/qguiapplication.o .obj/qwindow.o .obj/qoffscreensurface.o .obj/qplatformsurface.o .obj/qsurface.o .obj/qclipboard.o .obj/qcursor.o .obj/qdrag.o .obj/qdnd.o .obj/qevent.o .obj/qinputmethod.o .obj/qkeysequence.o .obj/qkeymapper.o .obj/qpalette.o .obj/qguivariant.o .obj/qscreen.o .obj/qshortcutmap.o .obj/qstylehints.o .obj/qtouchdevice.o .obj/qplatformsharedgraphicscache.o .obj/qplatformdialoghelper.o .obj/qplatformservices.o .obj/qplatformsystemtrayicon.o .obj/qplatformsessionmanager.o .obj/qplatformmenu.o .obj/qpixelformat.o .obj/qpaintdevicewindow.o .obj/qrasterwindow.o .obj/qplatformgraphicsbuffer.o .obj/qplatformgraphicsbufferhelper.o .obj/qinputdevicemanager.o .obj/qplatformopenglcontext.o .obj/qopenglcontext.o .obj/qopenglwindow.o .obj/qbitmap.o .obj/qimage.o .obj/qimage_conversions.o .obj/qimageiohandler.o .obj/qimagereader.o .obj/qimagewriter.o .obj/qpaintengine_pic.o .obj/qpicture.o .obj/qpictureformatplugin.o .obj/qpixmap.o .obj/qpixmapcache.o .obj/qplatformpixmap.o .obj/qmovie.o .obj/qpixmap_raster.o .obj/qpixmap_blitter.o .obj/qnativeimage.o .obj/qimagepixmapcleanuphooks.o .obj/qicon.o .obj/qiconloader.o .obj/qiconengine.o .obj/qiconengineplugin.o .obj/qbmphandler.o .obj/qppmhandler.o .obj/qxbmhandler.o .obj/qxpmhandler.o .obj/qpnghandler.o .obj/qfont.o .obj/qfontengine.o .obj/qfontsubset.o .obj/qfontmetrics.o .obj/qfontdatabase.o .obj/qtextengine.o .obj/qtextlayout.o .obj/qtextformat.o .obj/qtextobject.o .obj/qtextoption.o .obj/qfragmentmap.o .obj/qtextdocument.o .obj/qtextdocument_p.o .obj/qtexthtmlparser.o .obj/qabstracttextdocumentlayout.o .obj/qtextdocumentlayout.o .obj/qtextcursor.o .obj/qtextdocumentfragment.o .obj/qtextimagehandler.o .obj/qtexttable.o .obj/qtextlist.o .obj/qtextdocumentwriter.o .obj/qsyntaxhighlighter.o .obj/qcssparser.o .obj/qzip.o .obj/qtextodfwriter.o .obj/qstatictext.o .obj/qrawfont.o .obj/qglyphrun.o .obj/qdistancefield.o .obj/qfontengine_qpf2.o .obj/qplatformfontdatabase.o .obj/qharfbuzzng.o .obj/qbackingstore.o .obj/qbezier.o .obj/qblendfunctions.o .obj/qblittable.o .obj/qbrush.o .obj/qcolor.o .obj/qcolor_p.o .obj/qcosmeticstroker.o .obj/qcssutil.o .obj/qdrawhelper.o .obj/qemulationpaintengine.o .obj/qgammatables.o .obj/qgrayraster.o .obj/qimagescale.o .obj/qmatrix.o .obj/qmemrotate.o .obj/qoutlinemapper.o .obj/qpagedpaintdevice.o .obj/qpagelayout.o .obj/qpagesize.o .obj/qpaintdevice.o .obj/qpaintengine.o .obj/qpaintengineex.o .obj/qpaintengine_blitter.o .obj/qpaintengine_raster.o .obj/qpainter.o .obj/qpainterpath.o .obj/qpathclipper.o .obj/qpdf.o .obj/qpdfwriter.o .obj/qpen.o .obj/qpolygon.o .obj/qrasterizer.o .obj/qregion.o .obj/qstroker.o .obj/qtextureglyphcache.o .obj/qtransform.o .obj/qplatformbackingstore.o .obj/qpathsimplifier.o .obj/qdesktopservices.o .obj/qvalidator.o .obj/qgridlayoutengine.o .obj/qabstractlayoutstyleinfo.o .obj/qlayoutpolicy.o .obj/qgenericmatrix.o .obj/qmatrix4x4.o .obj/qquaternion.o .obj/qvector2d.o .obj/qvector3d.o .obj/qvector4d.o .obj/qopengl.o .obj/qopenglfunctions.o .obj/qopenglframebufferobject.o .obj/qopenglpaintdevice.o .obj/qopenglbuffer.o .obj/qopenglshaderprogram.o .obj/qopenglgradientcache.o .obj/qopengltexturecache.o .obj/qopenglengineshadermanager.o .obj/qopengl2pexvertexarray.o .obj/qopenglpaintengine.o .obj/qopenglcustomshaderstage.o .obj/qtriangulatingstroker.o .obj/qopengltextureglyphcache.o .obj/qtriangulator.o .obj/qopenglversionfunctions.o .obj/qopenglversionfunctionsfactory.o .obj/qopenglvertexarrayobject.o .obj/qopengldebug.o .obj/qopengltextureblitter.o .obj/qopengltexture.o .obj/qopengltexturehelper.o .obj/qopenglpixeltransferoptions.o .obj/qopenglfunctions_1_0.o .obj/qopenglfunctions_1_1.o .obj/qopenglfunctions_1_2.o .obj/qopenglfunctions_1_3.o .obj/qopenglfunctions_1_4.o .obj/qopenglfunctions_1_5.o .obj/qopenglfunctions_2_0.o .obj/qopenglfunctions_2_1.o .obj/qopenglfunctions_3_0.o .obj/qopenglfunctions_3_1.o .obj/qopenglfunctions_3_2_core.o .obj/qopenglfunctions_3_3_core.o .obj/qopenglfunctions_4_0_core.o .obj/qopenglfunctions_4_1_core.o .obj/qopenglfunctions_4_2_core.o .obj/qopenglfunctions_4_3_core.o .obj/qopenglfunctions_4_4_core.o .obj/qopenglfunctions_4_5_core.o .obj/qopenglfunctions_3_2_compatibility.o .obj/qopenglfunctions_3_3_compatibility.o .obj/qopenglfunctions_4_0_compatibility.o .obj/qopenglfunctions_4_1_compatibility.o .obj/qopenglfunctions_4_2_compatibility.o .obj/qopenglfunctions_4_3_compatibility.o .obj/qopenglfunctions_4_4_compatibility.o .obj/qopenglfunctions_4_5_compatibility.o .obj/qopengltimerquery.o .obj/qguivariantanimation.o .obj/qstandarditemmodel.o .obj/qimage_sse2.o .obj/qdrawhelper_sse2.o .obj/moc_qaccessible.o .obj/moc_qaccessiblecache_p.o .obj/moc_qaccessibleplugin.o .obj/moc_qaccessiblebridge.o .obj/moc_qgenericplugin.o .obj/moc_qplatforminputcontext.o .obj/moc_qplatforminputcontextplugin_p.o .obj/moc_qplatformintegrationplugin.o .obj/moc_qplatformthemeplugin.o .obj/moc_qplatformnativeinterface.o .obj/moc_qplatformmenu.o .obj/moc_qshapedpixmapdndwindow_p.o .obj/moc_qoffscreensurface.o .obj/moc_qclipboard.o .obj/moc_qdrag.o .obj/moc_qdnd_p.o .obj/moc_qevent.o .obj/moc_qkeysequence.o .obj/moc_qkeymapper_p.o .obj/moc_qpalette.o .obj/moc_qsessionmanager.o .obj/moc_qscreen.o .obj/moc_qstylehints.o .obj/moc_qtouchdevice.o .obj/moc_qplatformsharedgraphicscache.o .obj/moc_qplatformdialoghelper.o .obj/moc_qpaintdevicewindow.o .obj/moc_qrasterwindow.o .obj/moc_qplatformgraphicsbuffer.o .obj/moc_qinputdevicemanager_p.o .obj/moc_qopenglcontext.o .obj/moc_qopenglwindow.o .obj/moc_qimageiohandler.o .obj/moc_qpictureformatplugin.o .obj/moc_qiconengineplugin.o .obj/moc_qfont.o .obj/moc_qfontdatabase.o .obj/moc_qtextformat.o .obj/moc_qtextobject.o .obj/moc_qtextdocument.o .obj/moc_qtextimagehandler_p.o .obj/moc_qtexttable.o .obj/moc_qtextlist.o .obj/moc_qbrush.o .obj/moc_qpainter.o .obj/moc_qpdfwriter.o .obj/moc_qplatformbackingstore.o .obj/moc_qvalidator.o .obj/moc_qopenglshaderprogram.o .obj/moc_qopenglengineshadermanager_p.o .obj/moc_qopengltimerquery.o -L/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/lib -lQt5Core -lpthread -lpng -lqtharfbuzzng -lz -lGL
ln -s libQt5Gui.so.5.5.1 libQt5Gui.so
ln -s libQt5Gui.so.5.5.1 libQt5Gui.so.5
ln -s libQt5Gui.so.5.5.1 libQt5Gui.so.5.5
rm -f ../../lib/libQt5Gui.so.5.5.1
mv -f libQt5Gui.so.5.5.1 ../../lib/
rm -f ../../lib/libQt5Gui.so
rm -f ../../lib/libQt5Gui.so.5
rm -f ../../lib/libQt5Gui.so.5.5
mv -f libQt5Gui.so ../../lib/
mv -f libQt5Gui.so.5 ../../lib/
mv -f libQt5Gui.so.5.5 ../../lib/
make[3]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/gui'
make[2]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src'
make[1]: *** [Makefile:46: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase'
make: *** [Makefile:73: module-qtbase-make_first] Error 2
I left out most of the make output, but above is how it fails, any thoughts on this?
UPDATE 2
Thanks for taking the time to help #ssbssa. Here is the full output of the make -j 8 (compiling Qt 5.5.1)
https://raw.githubusercontent.com/cybex-dev/qt5.5.1-build_archlinux/master/qt5-build-output-all
Now you have many of these errors:
ssl/qsslcertificate_openssl.cpp: In function ‘uint qHash(const QSslCertificate&, uint)’:
ssl/qsslcertificate_openssl.cpp:63:30: error: invalid use of incomplete type ‘X509 {aka struct x509_st}’
return qHashBits(x509->sha1_hash, SHA_DIGEST_LENGTH, seed);
^~
In file included from /usr/include/openssl/crypto.h:31:0,
from /usr/include/openssl/comp.h:16,
from /usr/include/openssl/ssl.h:47,
from ../../include/QtNetwork/5.5.1/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:53,
from ../../include/QtNetwork/5.5.1/QtNetwork/private/qsslcontext_openssl_p.h:1,
from ssl/qsslsocket_p.h:55,
from ssl/qsslsocket_openssl_p.h:63,
from ssl/qsslsocket_openssl_symbols_p.h:64,
from ssl/qsslcertificate_openssl.cpp:35:
/usr/include/openssl/ossl_typ.h:119:16: note: forward declaration of ‘X509 {aka struct x509_st}’
typedef struct x509_st X509;
^~~~~~~
So you extracted openssl 1.0.2g into /opt/lib/openssl/, but there are other (newer?) openssl headers in /usr/include.
According to this answer, specifying you openssl header directory explicitely (add -I /opt/lib/openssl/include/openssl should solve this.

'fatal error: linux/compiler-gcc5.h: No such file or directory' during bitbake

I am attempting to run bitbake on a recipe with a non-yocto custom source. Using a linux-yocto source works fine, but when I attempt to use the linux-yocto-custom skeleton file provided by the yocto project files, I run into problems.
My file structure looks a little like this:
meta-test
|
.
.
.
+--recipes-kernel/
|
+--linux/
|
+--linux-yocto-custom_3.16.bb
+--linux-yocto-custom/
|
+--defconfig
Here's my modified skeleton file (linux-yocto-custom_3.16.bb):
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
SRC_URI += "file://defconfig"
LINUX_VERSION ?= "3.16"
LINUX_VERSION_EXTENSION_append = "-custom"
SRCREV_test="19583ca584d6f574384e17fe7613dfaeadcdc4a6"
PV = "${LINUX_VERSION}+git${SRCPV}"
COMPATIBLE_MACHINE = "test"
Here's the error log:
DEBUG: Executing shell function do_compile
NOTE: make -j 4 bzImage CC=i586-poky-linux-gcc -fuse-ld=bfd LD=i586-poky-linux-ld.bfd
make[1]: Entering directory `/home/me/poky/build/tmp/work/test-poky-linux/linux-yocto-custom/3.16+gitAUTOINC+19583ca584-r0/linux-test-standard-build'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
CHK include/config/kernel.release
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
UPD include/config/kernel.release
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
GEN ./Makefile
WRAP arch/x86/include/generated/asm/clkdev.h
WRAP arch/x86/include/generated/asm/early_ioremap.h
WRAP arch/x86/include/generated/asm/cputime.h
WRAP arch/x86/include/generated/asm/mcs_spinlock.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
In file included from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/linux/compiler.h:54:0,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/uapi/linux/stddef.h:1,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/linux/stddef.h:4,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/uapi/linux/posix_types.h:4,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/uapi/linux/types.h:13,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/linux/types.h:5,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/include/linux/mod_devicetable.h:11,
from /home/me/poky/build/tmp/work-shared/test/kernel-source/scripts/mod/devicetable-offsets.c:2:
/home/me/poky/build/tmp/work-shared/test/kernel-source/include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
make[4]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[3]: *** [scripts/mod] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sub-make] Error 2
make: *** [__sub-make] Error 2
WARNING: /home/me/poky/build/tmp/work/test-poky-linux/linux-yocto-custom/3.16+gitAUTOINC+19583ca584-r0/temp/run.do_compile.32722:1 exit 1 from
exit 1
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at /home/me/poky/build/tmp/work/test-poky-linux/linux-yocto-custom/3.16+gitAUTOINC+19583ca584-r0/temp/log.do_compile.32722)
I believe the most relevant portion is this part of the above log:
compiler-gcc.h:106:30: fatal error: linux/compiler-gcc5.h: No such file or directory
I'm really stumped because a file is generated during the build 'compiler-gcc5.h' at location build/tmp/work/test-poky-linux/core-image-test/1.0-r0/rootfs/usr/src/kernel/include/linux/compiler-gcc5.h. What's going on here? It seems to me that this header file's being requested before being fetched but I don't know how to fix that.
As you're fetching the kernel directly from Linus' tree, the 3.16 version does not support building with gcc5.
If you change to instead fetch from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git, i.e. the stable tree, and change to v3.16.7:
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;protocol=git;nocheckout=1;name=machine;branch=linux-3.16.y"
SRCREV_test = "d0335e4feea0d3f7a8af3116c5dc166239da7521"
then you should be able to build the kernel without any issue.

Missing soft link to linux source tree

In /lib/modules/xx.xx.xx-xx there is supposed to be two soft links one called source and one called build. The source one is there and its fine but the build one is missing and I have no idea where it is supposed to point to and I need to install a driver for my video card. Is there any way to find out where that is supposed to point if so how and where. I know there are a lot of other questions out there but not of them actually discribe where they are supposed to be pointing in the end.
Updated the link and now it is having build errors that I can't fix because I can't even find the struct its talking about
make -C /lib/modules/3.16.0-4-amd64/build M=/home/gibsont/gpuTempDriver modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC [M] /home/gibsont/gpuTempDriver/base.o
/home/gibsont/gpuTempDriver/base.c: In function ‘_rtl_init_mac80211’:
/home/gibsont/gpuTempDriver/base.c:319:6: error: ‘IEEE80211_HW_BEACON_FILTER’ undeclared (first use in this function)
IEEE80211_HW_BEACON_FILTER |
^
/home/gibsont/gpuTempDriver/base.c:319:6: note: each undeclared identifier is reported only once for each function it appears in
/home/gibsont/gpuTempDriver/base.c:349:4: error: ‘struct ieee80211_hw’ has no member named ‘channel_change_time’
hw->channel_change_time = 100;
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_action_proc’:
/home/gibsont/gpuTempDriver/base.c:858:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
rx_status.freq = hw->conf.channel->center_freq;
^
/home/gibsont/gpuTempDriver/base.c:859:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
rx_status.band = hw->conf.channel->band;
^
/home/gibsont/gpuTempDriver/base.c:861:25: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function)
rx_status.flag |= RX_FLAG_MACTIME_MPDU;
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_beacon_statistic’:
/home/gibsont/gpuTempDriver/base.c:1132:2: error: implicit declaration of function ‘compare_ether_addr’ [-Werror=implicit-function-declaration]
if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_send_smps_action’:
/home/gibsont/gpuTempDriver/base.c:1414:16: error: ‘struct <anonymous>’ has no member named ‘sta’
info->control.sta = sta;
^
/home/gibsont/gpuTempDriver/base.c:1415:24: error: ‘struct ieee80211_conf’ has no member named ‘channel’
info->band = hw->conf.channel->band;
^
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/home/gibsont/gpuTempDriver/base.o' failed
make[4]: *** [/home/gibsont/gpuTempDriver/base.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/home/gibsont/gpuTempDriver' failed
make[3]: *** [_module_/home/gibsont/gpuTempDriver] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 2
I copied it from the disk because it was a read only and placed it into my home directory.
I feel like this has become a whole new issues or possibly the link is wrong and is causing this issue.
this is mine:
2509142 lrwxrwxrwx 1 root root 37 Apr 24 15:02 build -> /usr/src/linux-headers-3.16.0-4-amd64
actually it's managed by package manager. I install linux headers using apt-get. I think you should do the same, unless you are advanced kernel developer.

What is the replacement of i_blksize member in struct inode?

I am compiling a stackable filesystem wrapfs and i got an error regardign missing member i_blksize in struct inode datastructure ? I looked up and found that after kernel version 2.6 it has been modified significantly and i_blksize has been removed. What is the replacement for that member ?
kunal#Baweja:~/Documents/wrapfs$ make
make -C /lib/modules/3.13.0-40-generic/build SUBDIRS=/home/kunal/Documents/wrapfs modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-40-generic'
CC [M] /home/kunal/Documents/wrapfs/fist_wrapfs.o
In file included from /home/kunal/Documents/wrapfs/fist_wrapfs.c:15:0:
/home/kunal/Documents/wrapfs/wrapfs.h: In function ‘fist_copy_attr_all’:
/home/kunal/Documents/wrapfs/wrapfs.h:203:6: error: ‘inode_t’ has no member named ‘i_blksize’
dest->i_blksize = src->i_blksize;
^
/home/kunal/Documents/wrapfs/wrapfs.h:203:23: error: ‘inode_t’ has no member named ‘i_blksize’
dest->i_blksize = src->i_blksize;
^
make[2]: *** [/home/kunal/Documents/wrapfs/fist_wrapfs.o] Error 1
make[1]: *** [_module_/home/kunal/Documents/wrapfs] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-40-generic'
make: *** [all] Error 2
Looks like it was an unnecessary duplicate
inode->i_blksize == (1 << inode->i_blkbits)
Check-out this mailing thread

Is there compatible ODBC driver with Mariadb 10 on Linux?

I tried to use MySQL ODBC driver but that resulted in an error when I compile. MySQL ODBC driver is fine with Mariadb 5.5 but not Mariadb 10. So is there ODBC driver for Mariadb 10?
I installed MySQL Connector ODBC Driver source code version.
The follow is error messages:
* MySQL Connector ODBC Driver 5.3.4
Scanning dependencies of target myodbc5a
[ 6%] Building C object driver/CMakeFiles/myodbc5a.dir/catalog.c.o
[ 7%] Building C object driver/CMakeFiles/myodbc5a.dir/catalog_no_i_s.c.o
/myodbc/mysql-connector-odbc-5.3.4-src/driver/catalog_no_i_s.c:1096:69: error: macro "my_init_dynamic_array" requires 5 arguments, but only 4 given
/myodbc/mysql-connector-odbc-5.3.4-src/driver/catalog_no_i_s.c: In function 'foreign_keys_no_i_s':
/myodbc/mysql-connector-odbc-5.3.4-src/driver/catalog_no_i_s.c:1096: error: 'my_init_dynamic_array' undeclared (first use in this function)
/myodbc/mysql-connector-odbc-5.3.4-src/driver/catalog_no_i_s.c:1096: error: (Each undeclared identifier is reported only once
/myodbc/mysql-connector-odbc-5.3.4-src/driver/catalog_no_i_s.c:1096: error: for each function it appears in.)
make[2]: *** [driver/CMakeFiles/myodbc5a.dir/catalog_no_i_s.c.o] 오류 1
make[1]: *** [driver/CMakeFiles/myodbc5a.dir/all] 오류 2
make: *** [all] 오류 2
* MySQL Conncector ODBC Driver 5.2.7
[ 5%] Built target myodbc-util
Scanning dependencies of target myodbc5a
[ 6%] Building C object driver/CMakeFiles/myodbc5a.dir/catalog.c.o
[ 8%] Building C object driver/CMakeFiles/myodbc5a.dir/catalog_no_i_s.c.o
/myodbc/mysql-connector-odbc-5.2.7-src/driver/catalog_no_i_s.c:1096:69: error: macro "my_init_dynamic_array" requires 5 arguments, but only 4 given
/myodbc/mysql-connector-odbc-5.2.7-src/driver/catalog_no_i_s.c: In function 'foreign_keys_no_i_s':
/myodbc/mysql-connector-odbc-5.2.7-src/driver/catalog_no_i_s.c:1096: error: 'my_init_dynamic_array' undeclared (first use in this function)
/myodbc/mysql-connector-odbc-5.2.7-src/driver/catalog_no_i_s.c:1096: error: (Each undeclared identifier is reported only once
/myodbc/mysql-connector-odbc-5.2.7-src/driver/catalog_no_i_s.c:1096: error: for each function it appears in.)
make[2]: *** [driver/CMakeFiles/myodbc5a.dir/catalog_no_i_s.c.o] 오류 1
make[1]: *** [driver/CMakeFiles/myodbc5a.dir/all] 오류 2
make: *** [all] 오류 2
* MySQL Conncector ODBC Driver 5.1.13
[ 9%] Building C object driver/CMakeFiles/myodbc5.dir/ansi.c.o
[ 11%] Building C object driver/CMakeFiles/myodbc5.dir/catalog.c.o
[ 12%] Building C object driver/CMakeFiles/myodbc5.dir/catalog_no_i_s.c.o
[ 14%] Building C object driver/CMakeFiles/myodbc5.dir/connect.c.o
[ 16%] Building C object driver/CMakeFiles/myodbc5.dir/cursor.c.o
[ 18%] Building C object driver/CMakeFiles/myodbc5.dir/desc.c.o
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:66:66: error: macro "my_init_dynamic_array" requires 5 arguments, but only 4 given
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c: In function 'desc_alloc':
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:66: error: 'my_init_dynamic_array' undeclared (first use in this function)
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:66: error: (Each undeclared identifier is reported only once
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:66: error: for each function it appears in.)
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c: In function 'MySQLSetDescField':
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:778: warning: cast from pointer to integer of different size
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:786: warning: cast from pointer to integer of different size
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:895:57: error: macro "my_init_dynamic_array" requires 5 arguments, but only 4 given
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c: In function 'MySQLCopyDesc':
/myodbc/mysql-connector-odbc-5.1.13-src/driver/desc.c:893: error: 'my_init_dynamic_array' undeclared (first use in this function)
make[2]: *** [driver/CMakeFiles/myodbc5.dir/desc.c.o] 오류 1
make[1]: *** [driver/CMakeFiles/myodbc5.dir/all] 오류 2
make: *** [all] 오류 2
Gentoo seems to have a patch for this:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch?view=markup
The problem was introduced with the addition of per-thread memory usage statistics ( https://mariadb.atlassian.net/browse/MDEV-4011 ) which required the addition of an additional parameter to the my_init_dynamic_array() macro. This macro isn't defined as part of the public client API, but is exposed in the my_sys.h header file nonetheless and is used by MySQL ODBC, so this change broke the ODBC code when compiled against recent MariaDB versions.
Alternatives are applying above patch, or switching to the MariaDB ODBC driver (which is still in beta though):
https://mariadb.com/kb/en/mariadb/client-libraries/mariadb-odbc-driver/

Resources