Trying to setup development environment on Ubuntu 20.10 according official manual:
https://docs.onion.io/omega2-docs/cross-compiling.html
Got error below while running make command:
/usr/include/asm-generic/int-ll64.h:31:42: error: conflicting types for '__u64'
31 | __extension__ typedef unsigned long long __u64;
| ^~~~~
In file included from <command-line>:
././include/compiler.h:69:18: note: previous declaration of '__u64' was here
69 | typedef uint64_t __u64;
| ^~~~~
Why I'm getting this? I did all steps in right way. How to fix that?
Im not sure why this issue has come up however, you can reference:
OpenWRT Compile Error
OpenWRT Build Error
The solution is to modify the a file in your buid_dir
build_dir/host/u-boot-2018.03/include/compiler.h
Remove/Comment out line 69 which contains:
typedef uint64_t __u64;
Related
When I was trying to compile QT 6.4.0 static with Mingw I had and error with fxc, after spending time found it was an error because it couldn't able to find fxc.exe so I added fxc to path from windows kits (10), after adding it fixed that error but now I'm getting different errors.
Configure: configure.bat -release -static -static-runtime -no-pch -optimize-size -opengl desktop -platform win32-g++ -prefix "C:\qt\6.4.0static\qt-static" -skip webengine -nomake tools -nomake tests -nomake examples
My OS: Windows 11 Pro (21H2).
For more log details: Pastebin
qsgd3d12engine.cpp: In member function 'D3D12_CPU_DESCRIPTOR_HANDLE QSGD3D12CPUDescriptorHeapManager::allocate(D3D12_DESCRIPTOR_HEAP_TYPE)':
qsgd3d12engine.cpp:121:41: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
121 | for (int bucket = 0; bucket < _countof(heap.freeMap); ++bucket)
| ^
qsgd3d12engine.cpp:157:23: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
157 | for (int i = 1; i < _countof(heap.freeMap); ++i)
| ^
qsgd3d12engine.cpp: In function 'void getHardwareAdapter(IDXGIFactory1*, IDXGIAdapter1**)':
qsgd3d12engine.cpp:224:83: error: expected primary-expression before ')' token
224 | HRESULT hr = D3D12CreateDevice(adapter.Get(), fl, _uuidof(ID3D12Device), nullptr);
| ^
qsgd3d12engine.cpp:224:63: error: '_uuidof' was not declared in this scope
224 | HRESULT hr = D3D12CreateDevice(adapter.Get(), fl, _uuidof(ID3D12Device), nullptr);
| ^~~~~~~
In file included from C:/msys64/mingw64/include/winbase.h:2811,
from C:/msys64/mingw64/include/windows.h:70,
from C:/Qt/dev/Qt/src/qtbase/src/corelib/global/qt_windows.h:64,
from C:\Qt\dev\Qt\src\qtbase\include/QtCore/qt_windows.h:1,
from C:/Qt/dev/Qt/src/qtbase/src/gui/opengl/qopengl.h:49,
from C:\Qt\dev\Qt\src\qtbase\include/QtGui/qopengl.h:1,
from C:/Qt/dev/Qt/src/qtdeclarative/src/quick/scenegraph/coreapi/qsggeometry.h:44,
from ..\..\..\..\include\QtQuick/qsggeometry.h:1,
from qsgd3d12engine_p.h:57,
from qsgd3d12engine.cpp:40:
qsgd3d12engine.cpp:241:80: error: expected primary-expression before ')' token
241 | if (SUCCEEDED(D3D12CreateDevice(adapter.Get(), fl, _uuidof(ID3D12Device), nullptr))) {
| ^
qsgd3d12engine.cpp:241:60: error: '_uuidof' was not declared in this scope
241 | if (SUCCEEDED(D3D12CreateDevice(adapter.Get(), fl, _uuidof(ID3D12Device), nullptr))) {
| ^~~~~~~
EDIT: Fixed the issues, check the marked answer for more details.
To fix __uuidof error with mingw follow the steps from this link:
https://forum.qt.io/topic/128587/build-failure-_uuidof-was-not-declared-in-this-scope/7
To fix QT DirectX issue follow this steps:
Download Windows SDK from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/. (I downloaded SDK for windows 11 (my OS)).
open this file pathToQTSource\qtdeclarative\plugins\scenegraph\d3d12\qsgd3d12engine.cpp in your preferred editor and add this line #include <d3d12sdklayers.h> at include section and save it.
That's it.
To fix another error I've faced while compiling mfvideorenderercontrol.cpp:
Goto pathToQtSource\qtmultimedia\src\plugins\wmf\player\mfvideorendercontrol.cpp and change the access modifier from protected to public of void customEvent(QEvent *event) function (declared at class PresentEvent).
Thanks to #thedemons for helping me to fix the issue.
Recently I have updated my MacBook operating system to Catalina 10.15.7 and Xcode command line tools to 12.1. Ever since I have been getting the following error when I try to use any C++ compiler:
gcc A3v2.cpp
In file included from /usr/local/include/c++/9.2.0/bits/postypes.h:40,
from /usr/local/include/c++/9.2.0/iosfwd:40,
from /usr/local/include/c++/9.2.0/ios:38,
from /usr/local/include/c++/9.2.0/ostream:38,
from /usr/local/include/c++/9.2.0/iostream:39,
from A3v2.cpp:13:
/usr/local/include/c++/9.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
44 | #include <wchar.h>
| ^~~~~~~~~
compilation terminated.
I have tried removing and re installing command line tools but it hasn't worked (amongst trying various other solutions I've found on Stackoverflow). When I run sudo find on wchar.h I get the following.
sudo find /Library -name wchar.h
find: /Library/Application Support/com.apple.TCC: Operation not permitted
/Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h
As a current work around (as I need a c++ compiler for a current assignment) I have been using:
/usr/bin/gcc A3v2.cpp
however I'm hoping this will just be temporary. I think this is a path problem since the missing header file exsits? Not sure what I am doing when it comes to specifying file paths so please let me know if you know how to solve this. Thanks!
I am getting build errors when trying to build Nginx with Wurfl. I am running in a Centos7 VM, combining nginx with other modules and specifying other flags doesn't seem to be causing any problems for me. However when I try to bundle with the wurfl module it fails. It gives errors such as:
-o objs/addon/src/ngx_http_wurfl_module.o \
../src/ngx_http_wurfl_module.c
../src/ngx_http_wurfl_module.c:63:5: error: unknown type name ‘wurfl_useragent_priority’
wurfl_useragent_priority useragent_priority;
^
../src/ngx_http_wurfl_module.c:86:15: error: ‘WURFL_UPDATER_FREQ_DAILY’ undeclared here (not in a function)
{"DAILY", WURFL_UPDATER_FREQ_DAILY},
^
../src/ngx_http_wurfl_module.c:86:5: error: missing initializer for field ‘value’ of ‘nginx_wurfl_updater_frequency_t {aka const struct <anonymous>}’ [-Werror=missing-field-initializers]
{"DAILY", WURFL_UPDATER_FREQ_DAILY},
^
../src/ngx_http_wurfl_module.c:82:15: note: ‘value’ declared here
const int value;
^
../src/ngx_http_wurfl_module.c:87:16: error: ‘WURFL_UPDATER_FREQ_WEEKLY’ undeclared here (not in a function)
{"WEEKLY", WURFL_UPDATER_FREQ_WEEKLY},
^
../src/ngx_http_wurfl_module.c:87:5: error: missing initializer for field ‘value’ of ‘nginx_wurfl_updater_frequency_t {aka const struct <anonymous>}’ [-Werror=missing-field-initializers]
{"WEEKLY", WURFL_UPDATER_FREQ_WEEKLY},
^
../src/ngx_http_wurfl_module.c:82:15: note: ‘value’ declared here
const int value;
^
In file included from src/core/ngx_core.h:58:0,
from ../src/ngx_http_wurfl_module.c:22:
../src/ngx_http_wurfl_module.c: In function ‘ngx_http_wurfl_init_main_conf’:
../src/ngx_http_wurfl_module.c:694:93: error: implicit declaration of function ‘wurfl_get_api_version’ [-Werror=implicit-function-declaration]
ngx_log_error(NGX_LOG_NOTICE, cf->log, 0, "WURFL: Engine created - API version %s", wurfl_get_api_version()
I am trying to build with the latest stable nginx, and a pulled wurfl from yesterday, and gcc 5.3.1. I am more or less using the generic build script provided by WURFL.
Anyone have any thoughts?
So there are a couple of components to the WURFL module and it looks like the issue could be a mismatch on the different components. I would make sure that your libwurfl and wurfl infuze version numbers are the same (the latest version is 1.8.4). Check out the first section of the documentation for more information on how to install libwurfl.
Next I would make sure that your nginx.conf file is appropriate for the version of wurfl you are using. There have been some big changes in the last few versionsof wurfl that may affect how it performs. You can check the documentation for an example configuration file for the latest version of wurfl. If you are using an older version, you can check the readme provided with the release.
If fixing these doesn't help, let me know what infuze version number you are working with so I can try to replicate your issue.
I am trying to build LLVM from source in FreeBSD 8.4.
Here are the steps i carried out
Downloaded the source from http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz
Extracted the source into a folder.
Created a build directory and inside it ran $ cmake
../llvm-3.8.0.src
Started the build using $cmake --build .
It throws the following error
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp: In member function 'llvm::tgtok::TokKind llvm::TGLexer::LexNumber()':
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:393:48: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(NumStart, nullptr, 16);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:398:60: error: 'strtoull' was not declared in this scope
CurIntVal = (int64_t)strtoull(NumStart, nullptr, 16);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:414:47: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(NumStart, nullptr, 2);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:429:44: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(TokStart, nullptr, 10);
GCC Version = 4.9.2
CMAKE version = 3.2.3
I also tried to include stdlib.h in the file llvm-3.8.0.src/lib/TableGen/TGLexer.cpp. This din't help.
Is there any configuration I am missing ?
The ports system exists for a good reason - many (pretty much all nontrivial) software needs patches and build tweaks to build and work properly. So my advice would be just that: use Ports.
Not sure if ports actually supports FreeBSD 8.4, though. Do you have any particular reason to use such an old release?
I've tried to build OpenCV on Raspberry Pi 2 with TBB,I've installed TBB from source on the Pi,I've specified the path to to TBB libs to cmake config but I'm getting the error:
/home/mihai/tbb43_20150316oss/include/tbb/machine/gcc_armv7.h:31:2: error: #error compilation requires an ARMv7-a architecture.
I think the error is because in the OpenCV makefile i have to include the flag for ARMv7
-DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0
The problem is that I don't know where to include it.Has anyone had this problem abd want to share a solution?
I have resolved it :D .For those having this problem follow these steps:
1.Go to file gcc_armv7.h line 31 and comment lines
30 #if !(__ARM_ARCH_7A__)
31 #error compilation requires an ARMv7-a architecture.
32 #endif
2.Next in the same file gcc_armv7.h go to line 56 and replace it with
56 #define __TBB_full_memory_fence() 0xffff0fa0 // __asm__ __volatile__("dmb ish": : :"memo ry")
For those who want an explanation how I did it, after the first step I get the following errors :
/tmp/ccnkbkfd.s:313: Error: selected processor does not support ARM mode `dmb ish'
/tmp/ccnkbkfd.s:386: Error: selected processor does not support ARM mode `dmb ish'
/tmp/ccnkbkfd.s:533: Error: selected processor does not support ARM mode `dmb ish'
/tmp/ccnkbkfd.s:562: Error: selected processor does not support ARM mode `dmb ish'
After I have searched on google and found this :
The alternative for using dmb is to call the Linux kernel __kuser_memory_barrier
the __kuser_memory_barrier helper operation is found in all ARM kernels 2.6.15 and later
and provide a way to issue a memory barrier that will work across all ARM arch.__kuser_memory_barrier
helper function found at address 0xffff0fa0
or you can run
sudo make CXXFLAGS="-DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0"
instead of just running
sudo make