How do you install zlib on aarch64? - zlib

I'm trying to see if I can get wagtail running locally on my Android phone (aarch64) with Termux. But it uses Pillow which has a dependency for zlib. I can't seem to find zlib on package depos like apt or pkg. Do I need to compile it from source? (Still a novice with Unix, sorry.)

zlib is already there in the NDK.

i was having the same problem. i have a note 8(samsung). just go to GitHub and install zlib from there, after that you will be avaible to install pillow.

You can fix this issue by running termux-chroot before running buildozer
buildozer expecte zlib to be
/usr/include/zlib.h
but in termux it is in
$PREFIX/include/zlib.h
By running termux-chroot, $PREFIX will be /usr

Related

Bluetooth C compiling

I am reposting this again in case missed out.
i have installed
sudo apt-get install libbluetooth-dev
and tried to compile btgatt-client.c from Blue5.54/tools/ with
gcc -o btgatt-client btgatt-client.c -lbluetooth
but get '#include "lib/bluetooth.h":no such file or directory'
What could be missing.I have tried move the files from '/usr/include/bluetooth'
the compilation folder but seems doesn't work. I am also curious where does this "src/shared/mainloop" from?
I am able to run the example and connect to nrf app but unable to compile the .c file.
The source files in BlueZ are not designed to be compiled singularly. Instead, you are supposed to build and install the entire BlueZ source, which in turn will compile btgatt-client.c for you. Please see the link below for instructions on how to build the entire BlueZ source:-
How to rebuild bluez
You will probably find that you need to install a lot of dependencies along the way, but you can either install these using sudo apt-get install <dependency> or try and not include it in the build. For example, to build BlueZ without systemd, you can do the following:-
./configure --disable-systemd
make
I hope this helps.
#Youssif Saeed. Thanks for the replies.
The good news is i have found out the cause.It seems the BlueZ bluetooth stack has an issue running in Raspbian Buster. I have downgrade the OS to Stretch and all seems up and running.
However i am trying gatt-client example and seems like not working when i set nrf app to advertising mode with exact UUID as in example. Or maybe i missed out certain part.Going to give a try with a simpler device like ESP32.
UPDATED
Thanks again guys.DBus gatt-client able to connect to BLMCU's. They key of operation is it needs to be paired > connected and read the BLE Server

Installing Kaldi on MacOS Catalina -- error with zlib

I am trying to work with the DiscVoice Library which requires the Kaldi Library. In order to install Kaldi, I needed to run extras/check_dependencies.sh to check the dependencies of the program, and I am currently getting:
extras/check_dependencies.sh: zlib is not installed.
extras/check_dependencies.sh: The following prerequisites are missing; install them first:
zlib1g-dev
I have been trying to install the zlib library, and have been unsuccessful. I have tried brew install zlib, which runs successfully but when I run the extras/check_dependencies.sh the output is not changed to reflect that.
I am working on macOS Catalina.
zlib is already there in macOS. You don't need to install it.
You might want to examine extras/check_dependencies.sh to see how it is looking for zlib. macOS does not store its headers files or library files in the usual locations.

simics installation libstdc++.so.6 version not found

I downloaded a tarball of simics from the web.
I tried to run the ./simics-gui
and I get this error
/home/leungtimothy/Desktop/simics/simics-4.0.60/amd64-linux/sys/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
I looked up a lot of posts, most of them are relate to linking problem. I am not able to find a libstdc++.so.6 on my 64 bits ubuntu v13.04 .
Any ideas about how to fix this?
Thank you so much
libstdc++ is the GNU Standard C++ library, which will be required by applications built with the GNU C++ compiler.
Evidently libstdc++6 is not installed on your system. It is typically installed by installing the GNU C++ compiler:
sudo apt-get install g++
If you don't need the compiler you can install libstdc++6 independently:
sudo apt-get install libstdc++6
I believe that Simics also ships with a few system libraries, that you can find in the installed base package (directory simics-<version>), at the path <host>/sys/lib/, where libstdc++.so.6 is one of them.
Looking at the path, it looks like it is Simics 4.0 which is over 8 years olds.
I suggest download and install the latest version of Simics from a proper source,
https://downloadcenter.intel.com/download/30403/Intel-Simics-Public-Release-Preview

Installing flex (lexical analyzer) on Mac

Can someone tell me how I can install flex (lexical analyzer) on my Mac? I searched everywhere on google and I can't find it. I have the universal binary and I extracted it to my desktop but I have no idea where to go from here. Any help would be greatly appreciated!
Try using Homebrew (Packet manager for Mac) and use the following command :-
brew install flex
You can use macports to install flex
You can always install from source. Download the tarball from the flex site, extract it, cd to the directory where you extracted it, and run the following:
./configure
make
make install
make clean
Assuming you have make and a C compiler on your Mac, which I believe all Macs have.
Flex is shipped with the xCode Command line tools; you only got to install them via xcode > preferences > downloads > Command line tools. This also includes gcc (Clang).
This info can help to somebody to save time:
Just today I have try to install FLEX 2.5.39 from sources.
Make - fails.
After some thoughts I have decide to try older archives.
2.5.38 - fail
2.5.37 - OK
It seems on now() = 2015-03-15, macport also uses 2.5.37 build.

How to set up libusb on Mac OS X?

I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane) it said something about examples which I couldn't find anywhere on my computer.
Could anyone please describe how do I set up libusb for development on OS X? May I use Xcode? What should I include in my code?
brew install libusb-compat
Working on OSX Yosemite 10.10
Easiest way to do this:
brew install libusb
Homebrew is amazing and I recommend it for all developers that use Mac.
I tried to install the SDK from the aforementioned website and couldn't find a trace of it once the installer finished. Though I did find some libusb items at /usr/local/Developer/SDKs/MacOSX10.6.sdk/usr/local/ I'm not sure it came from that installer as I couldn't find any examples, just libraries and they were labeled as libusb0.1.4.
On the other hand, since you asked your question with the macports tag, I'd suggest you use that to install libusb as it at least puts everything in a known location:
/opt/local/var/macports/software for install files
/opt/local/lib for libraries
/opt/local/include for header files
If you've never used macports then once you have macports installed then you can install libusb using
sudo port install libusb
to install libusb1.0 or
sudo port install libusb-legacy
to install libusb0.1.12.
Then you can create a project in Xcode and link to the libusb-*.a library contained in /opt/local/lib (in my directory my library file is called libusb-1.0.a since I have libusb1.0 installed).
I don't have much experience using Xcode so I can't help you any further down this path. Personally what I've done so far is use a Python wrapper called pyusb to do some quick experimentation with libusb as I don't have to do IDE setup or library/include file setup with Python.
UPDATE: Poking around the macports install directory for libusb, I didn't find any examples included which was a bummer. If you've gotten this far then I'd suggest going directly to the source for libusb, download and unpack the tar file, and building the code that's in the example directory. Sorry for the roundabout way of getting libusb examples but I've really come to appreciate the organization macports imposes on installations which saves me quite a bit of future pain (like when I want to uninstall).
once libusb is installed using following command:
brew install libusb
or
brew install libusb-compat
link libusb to the build system using
brew link libusb
to be able to configure any project depending on libusb, use pkg-config:
pkg-config --cflags libusb-1.0
and
pkg-config --libs libusb-1.0
before calling any ./configure

Resources