AllJoynChat sample - directory not found for option '-L/build/Debug-iphoneos' - alljoyn

I tried to build the AllJoynChat sample and got the following error message:
ld: warning: directory not found for option '-L/build/Debug-iphoneos'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Xcode 7.2 and iOS 9.2 SDK. Any help?

It seems like your the build cannot find openssl library.
The following steps need to be followed exactly as below:
Unzip the AllJoyn SDK package to a folder on your development system.
Download and copy the OpenSSL source into a separate folder on your development system, not under the AllJoyn SDK.
Navigate to the OpenSSL source top folder in Finder, and copy the openssl.xcodeproj folder you downloaded from GitHub into this folder.
Open the openssl.xcodeproj in Xcode.
In Xcode, build the crypto target (libssl.a and libcrypto.a) for each
combination of configuration (debug|release) and platform (iphoneos|iphonesimulator) that you need for your iOS project by selecting Product->Build For->(your desired configuration).
Create a new folder called "build" under the top-level OpenSSL folder created in step 1.
Locate your OpenSSL build products folders (i.e.: Debug-iphoneos) in the
/Users//Library/Developer/Xcode/DerivedData/XXXXXXXXXXXXX-openssl/Build/Products folder, and copy all the - folders, like Debug-iphoneos, to the build
folder created in step 6.
You should now have a folder structure similar to this containing libssl and libcrypto
for each $(CONFIGURATION)-$(PLATFORM_NAME) you built in step 5:
openssl-1.0.1c
build
Debug-iphoneos
libssl.a
libcrypto.a
Debug-iphonesimulator
libssl.a
libcrypto.a
Define an environment variable OPENSSL_ROOT=
This environment variable needs to be present whenever you build projects using the AllJoyn SDK.
9a. For Mac OS X 10.7 to 10.9, to set the environment variable, open a Terminal window and type the
following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
Restart XCode.
9b. With Mac OS X 10.10, environment variable processing changed. Most importantly, OPENSSL_ROOT
must be defined before launching Xcode (Xcode will not pick up new or changed variables
after launching). Therefore, to set the environment variable, open a Terminal window and type
the following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
sudo killall Finder
sudo killall Dock
Restart XCode.
If you have already done the above check step 9 since the step differs for different version of OS X and you may be on the latest version for which the instructions have not been updated yet.

Related

Can not load library Qt5Widgets.dll

Error when run FBLTool_0224.exe
I guess you double-clicked in exe file that provides after building in release mode :
For Deploy and create Exe output with QT in windows you should follow this way:
put your compiler path in your system path. now you use mingw81_64 you should set it. something like Qt/tools/mingw81_64/bin
copy exe file that provides after building in release mode in one folder and run mingw81_64 cmd (it has separate cmd)
and cd to that folder path
windeployqt app.exe
This command will get all dll needs for your app and your exe will work .
if you use qml
windeployqt --qmldir (the path of its directory ) app.exe
and also see these youtube videos for more info:
https://www.youtube.com/watch?v=LdSTgR0xJco
https://www.youtube.com/watch?v=hCXAgB6y8eA
installing visual C++ 2010 runtime x86 solved problem

What does --prefix in ./configure script do when building a software in Linux?

I'd install a software in Linux from source code. I already downloaded the source code from the git project then the next step is to install the libraries needed for running the software.
Let's say the source code is found in a folder called Main_Folder and the library is found in another folder Lib_Folder. Let's go to latter folder and running the configure.sh script to configure the program, so my question is the following:
In the ./configure command line there is an option called --prefix{} which should specify a given path, I'd know which path I have to put here ? is it the path to the main software or whatever ?
In general --prefix defines target installation directory where built software will be installed when running make install.
For example if you run ./configure=/opt executables will be installed in /opt/bin, libraries in /opt/lib, man pages in /opt/man/ etc.
See autoconf --prefix documentation.

How to tell Visual Studio Code compiled from source where to find sqlite module?

I am building the Visual Studio Code from the source checked out from the git repository:
git clone https://github.com/microsoft/vscode
I am building using:
export NODE_OPTIONS=--max_old_space_size=2048
./scripts/npm.sh install --arch=armhf
./scripts/code.sh
I am using node 10.16.3 on a Raspberry PI 4, using Raspbian buster
There were no errors during build.
The installation downloads a precompiled version of electron on the first run.
However each time I try and run code, it starts but with an error:
[storage state.vscdb] open(): Unable to open DB due to Error: Cannot find module '../build/Release/sqlite
If I look in node_modules/vscode-sqlite3/build/Release/
I can see:
sqlite3.a
sqlite.a
It is unclear to me why electron/vscode cannot find this library. I would be greatful for any pointers on how to tell the runtime where to look for the modules.
On inspecting the build scripts and after many painful experiments, I've found and solved the 2 problems leading to this error.
The fact that .a static libraries are left behind hinted that some settings in the binding.gyp, config.gpy and/or makefiles are wrong, as Native Node Modules are normally dynamic libraries with an .node extension. One conditional line in the binding.gyp file under vscode-sqlite3 seems to the the culprit:
...
["target_arch=='arm'", {"type": "static_library"}]
...
Disable that line (by removing it or changing 'arm' to something else) and then run:
node-gyp configure
to regenerate the config.gpy file(s) under the build directory. Then build the module with:
node-gyp build
A sqlite.node will be generated in build/Release.
Unfortunately, the latest electron ABI version rarely matches that of the Node.js version. In my configuration, the electron ABI version is 72 (v6.0.12) but the latest stable Node version is for ABI 64. Therefore we have to do an electron-rebuild to update the sqlite.node to match the electron version.
To do this, you would have to first install electron-rebuild (yarn add electron-rebuild) then run electron-rebuild by giving supplying explicitly the version number of the electron binary that vscode downloaded:
electron-rebuild -v 6.0.12 -m /home/dev/vscode -o vscode-sqlite3
Of course you would have to state the version number of your particular version of electron you are building for.
(Please look up electron-rebuild --help for the meaning of the options. It takes a while to rebuild the binary module...)
The resulting sqlite.node can then be moved into the build/Release/. directory under the vscode project directory. Voila, we have a working latest version VS-Code for Raspbian!

Conan-based Qt installation uses wrong home dir for linking

I'm trying to build our application using Qt 5.13.0 installed via Conan/Artifactory. We run our own Artifactory server and the Qt version there is self-build (and statically linked) in our CI solution. We use the Conan recipe for Qt written by the bincrafters, slightly modified to apply some patches for known Qt bugs and set some flags for building properly on Android and WebAssembly.
When trying to build the application, the linker fails to find the necessary dependencies for Qt itself because it tries to look them up in the home folder of the user who build the Qt package, not the user who's running the build.
Here's an excerpt from the build log, showing the attempt at linking all previously compiled object files together:
application folder-------v subproject of the application----v-------v dependency of the application, correct user home dir---------v Qt library installed via Conan, correct user home dir-------v dependency of Qt, WRONG user home dir------------v
g++ -Wl,--gc-sections -o ../../fah [--> all the .o files <--] -L../lib -lmodel -lcore [--> more linked libraries and application parts <--] -L/home/kaupes/.conan/data/libsodium/1.0.18/bje/stable/package/d1efe3774eed76670888f919621e7c4e1b52efa9/lib /home/kaupes/.conan/data/qt/5.13.0/bje/stable/package/d6b3f512e1a5607061462f94e3271dc8af3dd516/lib/libQt5Gui.a /home/dev/.conan/data/harfbuzz/2.4.0/bje/stable/package/c68551ae35bf5d62e66263379d58a38416eb84a9/lib/libharfbuzz.a [--> many, many more libraries <--]
g++: error: /home/dev/.conan/data/harfbuzz/2.4.0/bje/stable/package/c68551ae35bf5d62e66263379d58a38416eb84a9/lib/libharfbuzz.a: No such file or directory
many, many more errors...
As you can see, the user running the build is kaupes, but the g++ invocation attempts to look for the dependencies in /home/dev/, the home folder of the CI user who build the Qt Conan package.
Only dependencies of Qt itself have the problem. Dependencies of the application (also installed via Conan) are found at the correct place.
The Qt package has been build in the CI using the following Conan invocation:
conan create --profile .conan/profiles/linux -s compiler=gcc -s compiler.version=9 . fah/stable
Compiler and version are explicitly set because I'm also build for another GCC version. The linux profile file also doesn't do anything interesting (as far as I can see):
include(default)
[settings]
build_type=Release
compiler.libcxx=libstdc++11
[options]
OpenSSL:shared=False
OpenSSL:no_asm=True
OpenSSL:no_asm=True
OpenSSL:no_weak_ssl_ciphers=True
OpenSSL:no_ssl2=True
OpenSSL:no_ssl3=True
OpenSSL:no_engine=True
libcurl:shared=False
libxml2:shared=False
libxml2:fPIC=True
libsodium:shared=False
pcre2:shared=False
libpng:shared=False
freetype:shared=False
bzip2:shared=False
libjpeg:shared=False
harfbuzz:shared=False
xkbcommon:shared=False
qt:shared=False
qt:with_glib=False
qt:with_sqlite3=False
qt:with_mysql=False
qt:with_pq=False
qt:with_odbc=False
qt:with_sdl2=False
qt:with_openal=False
qt:with_libalsa=False
qt:openssl=True
qt:commercial=False
qt:qtsvg=True
qt:qtdeclarative=True
qt:qtactiveqt=False
qt:qtscript=False
qt:qtmultimedia=False
qt:qttools=True
qt:qtxmlpatterns=False
qt:qttranslations=True
qt:qtdoc=False
qt:qtrepotools=False
qt:qtqa=False
qt:qtlocation=True
qt:qtsensors=True
qt:qtwayland=True
qt:qt3d=False
qt:qtimageformats=False
qt:qtgraphicaleffects=True
qt:qtquickcontrols=True
qt:qtserialbus=False
qt:qtserialport=False
qt:qtx11extras=True
qt:qtmacextras=False
qt:qtwinextras=False
qt:qtandroidextras=False
qt:qtwebsockets=True
qt:qtwebchannel=False
qt:qtwebengine=False
qt:qtwebview=False
qt:qtquickcontrols2=True
qt:qtpurchasing=False
qt:qtcharts=True
qt:qtdatavis3d=False
qt:qtvirtualkeyboard=True
qt:qtgamepad=False
qt:qtscxml=False
qt:qtspeech=False
qt:qtnetworkauth=False
qt:qtremoteobjects=False
qt:qtwebglplugin=False
qt:qtlottie=False
qt:qtconnectivity=True
Is there something I'm doing wrong during the Conan package creation or installation or is this caused by something different?
Indeed, when building qt, all paths to dependencies are hardcoded in configurations files (mkspecs\modules\qt_lib_*.pri).
I assume you are building your application with qmake, because you use static qt, and static qt is incompatible with cmake. One thing you could try is to pass the full path to harfbuzz lib to qmake by adding argument QMAKE_LIBS_HARFBUZZ=/home/kaupes/.conan/data/harfbuzz/2.4.0/bje/stable/package/c68551ae35bf5d62e66263379d58a38416eb84a9/lib/libharfbuzz.a to your qmake invocation.
Edit: it seems to be a knwonw behaviour of qt >= 5.12.1 : https://bugreports.qt.io/browse/QTBUG-72903. This feature has been reverted in 5.14.x and 5.15.x with https://github.com/qt/qtbase/commit/9864d2c6f3b628ca9f07a56b197e77bd43931cca

How do I upgrade MinTTY in Git for Windows

I appreciate that this is borderline off-topic, but it does "directly involve programming or programming tools" so I figure it's just about OK...
I've just installed a newly downloaded version of Git for Windows, and noticed that in the Options dialog, the title bar says "mintty 2.8.5 is available". According to the About dialog, I currently have version 2.8.4.
I assume it's telling me that there's a new version because I am able to upgrade it myself, but I can't find any information about how to do so. I've downloaded the zip file from mintty.github.io, but don't really want to have to build it manually if I can avoid it.
Is there some way to do this, or is the easiest option just to wait for an updated build of Git For Windows that includes the new version of MinTTY?
mintty is a terminal emulator program available for Cygwin and msys2 environment. In both environment, mintty can be compiled as 32bit and 64bit. Hence it will be easy to deploy if users/package maintainer compile themselves with their own toolchain. Here are the two mainstream toolchain associated with mintty.
Cygwin: You can search the full package namecygwin package search. Cygwin maintains multiple mirror URLs to download a package. Here is one of the mirror:
32bit: https://mirrors.kernel.org/sourceware/cygwin/x86/release/mintty/
64bit: https://mirrors.kernel.org/sourceware/cygwin/x86_64/release/mintty/
msys2: msys2 also maintains mirror URLs to download. You can browse whole packages list in http://repo.msys2.org/. Open that URL in a browser. As mintty need msys2 dynamic library, it can be found in msys2 directory. Search mintty in these webpages:
32bit: http://repo.msys2.org/msys/i686/
64bit: http://repo.msys2.org/msys/x86_64/
To use it in Git-For-Windows, download the mintty tarball file from msys2 links according to your installed one 32bit or 64bit. You can find mintty.exe in that .tar.xz file's usr/bin folder. Extract and place that executable in Git-For-Windows installation folder e.g. C:\Program Files\Git\usr\bin.
Note: Mintty need a dynamic library (e.g. cygwin1.dll or msys-2.0.dll) and a shell (e.g. bash.exe, dash.exe etc.) or a command line program to run. And it should be placed in /usr/bin or /bin folder as per your specific environment. For Cygwin specifically, you also need cygwin-console-helper.exe to hide the console window (conhost.exe process). In msys2 environment, mintty version may be lower than the Cygwin one.
I was having a similar issue with Git Bash saying "mintty 3.5.2 available". I simply used the following command in Git Bash.
git update-git-for-windows
It re-ran the installer and updated both my Git for Windows and mintty versions to the latest ones. The command is only valid from Git for Windows v2.16.1(2) though.

Resources