I want to build Qt 6 with prebuilt MySQL/OpenSSL libs to try out new features, but I have some issues with configure parameters.
For example, I have such configure parameters:
configure.bat -debug -static -static-runtime -confirm-license -opensource -nomake examples -no-ltcg -sql-mysql -openssl-linked -prefix "C:\Test\6.0.0\msvc2019_64"
When I add the -sql-mysql or -openssl-linked parameters I got the following issue:
CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:788 (message):
CMake exited with code 1.
Also, I have tried to use -skip qtwebengine, but cmake returns BUILD_qtwebengine not used by the project. Some of the parameters does not translate into cmake properly. Where I can get full list of cmake parameters to build the Qt 6?
[Updated]
I have translated a few parameters to cmake:
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DQT_BUILD_EXAMPLES=OFF -DINPUT_static_runtime=ON -DFEATURE_ltcg=OFF -DCMAKE_INSTALL_PREFIX="C:\Test\6.0.0\msvc2019_64" -G Ninja C:\QtBuild\qt-everywhere-src-6.0.0
But still can not find any docs how to translate those: -confirm-license -opensource -skip qtwebengine -openssl_linked -sql-mysql
I have previously built MySQL libs by using CMake Option Reference: https://dev.mysql.com/doc/mysql-sourcebuild-excerpt/8.0/en/source-configuration-options.html#cmake-option-reference
Is there any similar reference available for Qt 6? Thank you.
Thanks to lixinwei (https://bugreports.qt.io/browse/QTBUG-89993) the issue is resolved. Now, it successfully finds the OpenSSL and MySQL libs.
Cmake paramaters:
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DQT_BUILD_EXAMPLES=OFF -DINPUT_static_runtime=ON -DFEATURE_ltcg=OFF -DBUILD_qtwebengine=OFF -DOPENSSL_ROOT_DIR="C:\OpenSSL\openssl-1.1.1i\static\x64\debug" -DOPENSSL_USE_STATIC_LIBS=TRUE -DOPENSSL_MSVC_STATIC_RT=TRUE -DINPUT_sql_mysql=ON -DMySQL_INCLUDE_DIRS="C:\MySQL\mysql-5.7.32-winx64\debug\include" -DMySQL_LIBRARIES="C:\MySQL\mysql-5.7.32-winx64\debug\lib\mysqlclientMTd.lib" -DCMAKE_INSTALL_PREFIX="C:\QtStatic\6.0.0\msvc2019_64" -G Ninja C:\QtBuild\qt-everywhere-src-6.0.0
list all qt6 features as cmake flags:
find . -name configure.cmake | xargs cat | grep ^qt_feature | cut -d'"' -f2 | sed 's/-/_/g; s/^.*$/ "-DQT_FEATURE_&=ON"/' | tee all-features.txt
head all-features.txt
"-DQT_FEATURE_qtwebengine_build=ON"
"-DQT_FEATURE_qtwebengine_core_build=ON"
"-DQT_FEATURE_qtwebengine_widgets_build=ON"
"-DQT_FEATURE_qtwebengine_quick_build=ON"
cat all-features.txt | grep some_feature
Related
I've been trying to convert a cpp file to wasm without emscripten recently and I've been running with some errors, for example, when I run these commands:
clang++ --target=wasm32 -nostdlib -O3 -o public/main.o -c src/*.cpp
wasm-ld --no-entry --export-all --lto-O3 --allow-undefined --import-memory public/main.o -o public/main.wasm
it gives me this error:
wasm-ld: error: unknown file type public/main.o
Here are the versions of clang and lld that I currently have:
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/jp4r5v8pla63qam5w34jvfyfmq8p74am-clang-12.0.1/bin
LLD 12.0.1
Also, I'm running the code on replit
Thank you
Ok, with this commands it works :D
clang++ --target=wasm32 -emit-llvm -c -S -o public/files/main.ll src/main.cpp
llc -march=wasm32 -filetype=obj -o public/files/main.o public/files/main.ll
wasm-ld --no-entry --export-all -o public/main.wasm public/files/main.o
The only thing is that you need to create some new files (main.ll and main.o) but it doesn't matter.
The place where I obtained the solution is here: https://surma.dev/things/c-to-webassembly/index.html
It was really useful
I am not able to resolve this issue from so long please do help me anyone..
Apple Mach-O Linker (Id) Error
Linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify- bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify normal arm64
cd /Users/anubhavpilania/newNotify/ios
export IPHONEOS_DEPLOYMENT_TARGET=11.4
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -
L/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos -F/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef
/Build/Products/Debug-iphoneos -filelist /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=11.4 -Xlinker -object_path_lto -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -lc++ -ObjC /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTBlob.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libWindowsAzureMessaging.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAnimation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libReact.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTImage.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTText.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_dependency_info.dat -o /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify
duplicate symbol _RCTRemoteNotificationReceived in:
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a(RCTPushNotificationManager.o)
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a(RCTAzureNotificationHubManager.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In my case this issue occurred when I switched from PushNotificationIOS provided with the React Native core to the extracted version from #react-native-community/push-notification-ios. (Around version RN 0.60)
After linking the new library and installing the CocoaPods dependencies of the iOS project this issue started popping up.
For some reason while setting up the core RN Push Notification library I manually added libRCTPushNotification.a to the "Linked Frameworks and Libraries" of my project. Removing this reference to the core library resolved the issue and let me compile again.
The PushNotificationIOS was split out from the core React Native. So this issue comes up when migrating to the new module #react-native-community/push-notification-ios.
To fix this, just remove or comment out the PushNotificationIOS library from the Podfile: ./ios/Podfile
pod 'React-RCTPushNotification', :path => '../node_modules/react-
native/Libraries/PushNotificationIOS'
Then, run the following commands:
rm -rf Pods
pod install
Rebuild and then run your project.
If you are using a Podfile you can also remove React-RCTPushNotification and add the following...
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
because React-RCTPushNotification is from 'react-native' but push notifications has been moved to #react-native-community.
I ran into the same issue as #Padarom, upgrading.
In Podfile, I had to remove the RCTPushNotification line
pod 'React',
:path => "../node_modules/react-native",
:inhibit_warnings => true,
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
.....
"RCTPushNotification", <== REMOVE
after another pod install it worked
I am working on tesseract engine . Used red hat linux to build both leptonica and tesseract . On running tesseract getting following error.
[tesseract-ocr]$ tesseract address.png out1
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica
Error in pixReadStreamPng: function not present
Error in pixReadStream: png: no pix returned
Error in pixRead: pix not read
Error during processing.
while searching on the net , i came to find that it is problem with leptonica build . and it is not built properly with ltiff . In fact in config.log which gets generated out of ./configure command . i can see following
configure:12538: checking for TIFFOpen in -ltiff
configure:12564: gcc -o conftest -g -O2 -Wl,-rpath -Wl,/lib64 conftest.c -ltiff -lm
>&5
/bin/ld: cannot find -ltiff
However i see that libtiff is present in the system
[ec2-user#ip-172-31-35-131 lib]$ ldconfig -p | grep libtif
libtiffxx.so.5 (libc6,x86-64) => /lib64/libtiffxx.so.5
libtiff.so.5 (libc6,x86-64) => /lib64/libtiff.so.5
I tried pointing to /lib64 path , as per reference from leptonica site [http://www.leptonica.com/source/README.html][1]
Finally, if you find that the installed programs are unable to link
at runtime to the installed library, which is in /usr/local/lib,
try to run configure in this way:
LDFLAGS="-Wl,-rpath -Wl,/usr/local/lib" ./configure
which causes the compiler to pass those options through to the linker.
changing LDFLAGS to point to /lib64 is also not working LDFLAGS="-Wl,-rpath -Wl,/lib64" ./configure
Any suggestions ?
Try to install
apt-get install -y libtiff5-dev
Then install leptonica from source
git clone https://github.com/DanBloomberg/leptonica.git leptonica
cd leptonica
./autobuild
./configure --with-libtiff
make -j
make install
And reinstall tesseract after that
I recently tried to build my https://github.com/eyalroz/cuda-api-wrappers/ library's examples after switching to another Linux distribution on the same machine. Strangely enough, I encountered a linking issue. The command:
/usr/bin/c++ -Wall -std=c++11 -g CMakeFiles/device_management.dir/examples/by_runtime_api_module/device_management.cpp.o -o examples/bin/device_management -rdynamic lib/libcuda-api-wrappers.a -Wl,-Bstatic -lcudart_static -Wl,-Bdynamic -lpthread -ldl -lrt
fails to find the CUDA runtime library, and I get:
CMakeFiles/device_management.dir/examples/by_runtime_api_module/device_management.cpp.o: In function `cuda::device::peer_to_peer::get_attribute(cudaDeviceP2PAttr, int, int)':
/home/eyalroz/src/mine/cuda-api-wrappers/src/cuda/api/device.hpp:38: undefined reference to `cudaDeviceGetP2PAttribute'
collect2: error: ld returned 1 exit status
but if I add -L/usr/local/cuda/lib64 it builds fine. This didn't use to happen before; and it doesn't happen on another machine I've checked on, nor does it even happen to other targets using the CUDA runtime in the same CMakeLists.txt (like version_managament).
FindCUDA seems to be finding everything, as the value of ${CUDA_LIBRARIES} is /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so. And the target lines in CMakeLists.txt are:
add_executable(device_management EXCLUDE_FROM_ALL examples/by_runtime_api_module/device_management.cpp)
target_link_libraries(device_management cuda-api-wrappers ${CUDA_LIBRARIES})
as is suggested in answers to other related questions (e.g. here). Why is this happening? Should I "manually" add the -L switch?
Edit: Following #RobertCrovella's suggestion, here are the ld search paths:
$ gcc -print-search-dirs | sed '/^lib/b 1;d;:1;s,/[^/.][^/]*/\.\./,/,;t 1;s,:[^=]*=,:;,;s,;,; ,g' | tr \; \\012 | tr ':' "\n" | tail -n +3
/usr/local/cuda/lib64/x86_64-linux-gnu/5/
/usr/local/cuda/lib64/x86_64-linux-gnu/
/usr/local/cuda/lib/
/usr/lib/gcc/x86_64-linux-gnu/5/
/usr/x86_64-linux-gnu/lib/x86_64-linux-gnu/5/
/usr/x86_64-linux-gnu/lib/x86_64-linux-gnu/
/usr/x86_64-linux-gnu/lib/
/usr/lib/x86_64-linux-gnu/5/
/usr/lib/x86_64-linux-gnu/
/usr/lib/
/lib/x86_64-linux-gnu/5/
/lib/x86_64-linux-gnu/
/lib/
/usr/lib/x86_64-linux-gnu/5/
/usr/lib/x86_64-linux-gnu/
/usr/lib/
/usr/local/cuda/lib64/
/usr/x86_64-linux-gnu/lib/
/usr/lib/
/lib/
/usr/lib/
$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu")
SEARCH_DIR("=/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib")
Notes:
Yes, I know the CMakeLists.txt there is ugly.
TL;DR:
After the FindCUDA invocation, add the lines:
get_filename_component(CUDA_LIBRARY_DIR ${CUDA_CUDART_LIBRARY} DIRECTORY)
set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-L${CUDA_LIBRARY_DIR}")
and building should succeed on both systems.
Discussion:
(Paraphrasing #RobertCrovella and myself in the comments:)
OP was expecting, that if the following hold:
FindCUDA succeeds
${CUDA_LIBRARIES} includes a valid full path to either the static or the dynamic CUDA runtime library
the library dependency is indicated using target_link_libraries(relevant_target ${CUDA_LIBRARIES})
... then the CMake-based build he was attempting should succeed on a variety of valid CUDA installations. That is (unfortunately) not the case, since while FindCUDA does locate the CUDA library path, it does not actually make your linker search that path. So a failure should actually be expected. The build had worked on OP's old system due to a "fluke", or rather, due to OP having added the CUDA library directory to the linker's search path, somehow, apriori.
The linking command must be issued with the -L/path/to/cuda/libraries switch, so that the linker knows where to looks for the (unspecified-path) libraries referred to be the CUDA-related -l switches (in OP's case, -lcudart_static).
This answer discusses how to do that in CMake for different kinds of targets. You might also want to have a look at man gcc (the GCC manual page, also available here) regarding the -l and -L options, if you are not familiar with them.
HDTrans is suited to Fedora 4 core, but I want to use it on latest version of Fedora.
So I compiled it on Fedora 20 version, however it makes errors like these.
[root#localhost HDTrans-0.4-1-tsr]# make
gcc -M -fpic -O3 -Winline -finline-limit=30000 -DINLINE_EMITTERS --param inline- unit-growth=512 --param large-function-growth=2048 -funit-at-a-time -o .tmp.m decode.c
sed 's/\.o:/.new.o:/' .tmp.m > .decode.new.m
rm -f .tmp.m
gcc -c -fpic -O3 -Winline -finline-limit=30000 -DINLINE_EMITTERS --param inline-unit-growth=512 --param large-function-growth=2048 -funit-at-a-time -o decode.new.o decode.c
In file included from machine.h:38:0,
from decode.c:46:
signals.h:107:18: error: field ‘info’ has incomplete type
struct siginfo info;
^
make: *** [decode.new.o] error 1
I think some standard libraries changed when version upgraded make problems.
So I copied all libraries in /usr/include on 4 core, and changed /usr/include on 20 version to those of 4 core.
But same errorrs are made.
What are the problems? how to fix it?
Is there anyone who could help me?
[SourceCode]http://srl.cs.jhu.edu/projects/HDTrans/HDTrans-0.4-1.tar.gz
Here is source code download link.