How to recompile macport with additional ./configure flag? - macports

I have a py27-tkinter macport installed and it seems that it is compiled without "--enable-threads" flag that makes it unusable. It is any easy way without hand modification of portfile to recompile this port with addition ./configure flag? Brief internet search shows configure.args, but this command:
sudo port upgrade --force py27-tkinter configure.args="--enable-threads"
Changes nothing. Is it something i'm doing wrong or manual portfile modification is the only way?

Solution found: need to reinstall tcl macport with +threads variant.

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

FFmpeg: building example C codes

I have configured and compiled the FFmpeg library using this link:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
Now, I am trying to build example C codes provided by FFmpeg from here:
https://github.com/FFmpeg/FFmpeg/tree/master/doc/examples
However, when I run make install-examples or make install (suggested by /example/README), I receive this kind of message:
make: *** No rule to make target '/doc/examples/README', needed by
'install-examples'. Stop.
I thought this may be due to the rules not being in the correct MakeFile format (I am not sure why they refers to README). How should I go about in fixing this and compiling the example codes? I have tried to find solutions about this, but there doesn't seem to be much information online.
Thank you.
Run ./configure && make -j4 examples in the FFmpeg source directory, then look in doc/examples for the compiled examples.
Requires make and pkg-config.
To remove the compiled examples use make examplesclean in the FFmpeg source directory.
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build. If you think to configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to theffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem.
If you see this when you execute the above command then do this
macOS:
brew install yasm
Ubuntu:
sudo apt-get install yasm

How to install without make?

I am working with a BeagleBoard and I have already compiled ZMQ library with arm-linux-gnueabi gcc compiler. The problem is I don't know where to copy all that files because I don't have make command nor I am able to install it.
If I run:
uname -mrs
I get:
Linux 3.2.8-mg01.3 armv7l
Thanks in advance!
Build & install required library on your build machine:
./configure --prefix=/custom/location
make && make install
And then just copy /custom/location from your build machine to the target machine's root /.
You need to check that no stuff are being overwritten (or at least that no dependencies got lost).
Another, correct way, would be to create an installable package (i.e., deb or rpm), but that is a different question.

Apache 2.4.1 undefined reference to `SSLv2_client_method'

I was previously running apache 2.2.20 and openssl 1.0.0e. I installed openssl 1.0.1, then downloaded the tarball for apache 2.4.1 and installed apr 1.4.6 & apr-util 1.4.1 with --prefix=/usr/local. I configured apache2 with:
sudo ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all
--enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http
--enable-rewrite --enable-cache --enable-mem-cache --enable-ssl --enable-headers
--with-mpm=worker --with-included-apr
But after running sudo make I get an error:
httpd-2.4.1/support/ab.c:2227: undefined reference to `SSLv2_client_method'
What is causing this error and how do I correct it?
You may have built openssl with SSLv2 disabled, some distributions have that disabled (Debian, starting from 7.0 -Wheezy- is one). Looking at the source, it looks like if you define the OPENSSL_NO_SSL2 preprocessor flag, apache won't call the SSLv2_client_method() function.
You can also download openssl's tarbal and compile openssl with
./config shared no-ssl2
This will set the flag OPENSSL_NO_SSL2 that Jon Lin mentioned.
It has nothing to do with OpenSSL compilation. PHP is the culprit which is causing the error.
(Note: The is another issue with OpenSSL which might prevent u from generating openssl.so and opencrypto.so shared libraries)
Here is the overview of how it happened. PHP compiles its compilation and when "make install" is given it copies the libphp*.so to /usr/local/apache2/modules.
The source code for this error is openssl.c in /usr/local/php-5.5.3/ext/openssl
So the simple solution is to handle it in the top level Makefile. By adding
CPPFLAGS = -D_REENTRANT -DTHREAD=1 -DOPENSSL_NO_SSL2
Make the above change AFTER you run the configure script. Hope this helps :)
Try with another Apache version. With Apache 2.2.15 the error was present but when i change to Apache 2.2.27 the "reference to `SSLv2_client_method" error simply disappeared
The compilation line is:
./configure --with-ssl --enable-ssl
That's all.

AIX Package Install Issues

I want to install gettext but i cannot because my AIX says that gettext is dependent on glib and when i try to install glib it says that I cannot because glib is in turn dependent on gettext.
Please let me know how I could get past this situation?
root [rover]% rpm -i gettext-0.17-1.aix5.1.ppc.rpm
error: failed dependencies: libglib-2.0.a(libglib-2.0.so.0) is needed by gettext-0.17-1
libxlsmp.a(smprt.o) is needed by gettext-0.17-1
root [rover]% rpm -i glib2-2.22.5-2.aix5.1.ppc.rpm
error: failed dependencies: gettext is needed by glib2-2.22.5-2
You really have 2 problems:
error: failed dependencies: libglib-2.0.a(libglib-2.0.so.0) is needed by gettext-0.17-1
libxlsmp.a(smprt.o) is needed by gettext-0.17-1
The first error is indeed solved by what is said above (DO NOT use the --nodeps option in this case, it can cause really bad things to happen): use rpm -i (or -U for upgrade) to install both gettext and glib2 at the same time. If you have both in the same directory you can just use rpm -ihv (or -Uhv) *.rpm to install all of the RPM's at once, and it will resolve interdependencies that way.
HOWEVER, you still will not likely be able to install gettext due to #2: libxlsmp.a is a SECOND library/dependency that you need to solve.
It's my understanding that this library comes from a base AIX package (NOT an RPM/Open Source package) that will need to be installed from your AIX installation Media by installp. According to other web research it's the "xlsmp" package.
You have to pass in both files at once for dependency resolution to work: rpm -U gettext.rpm glib2.rpm.
I am not sure this will work or not, but install one of the package ignoring the dependencies.
use --nodeps flag of rpm to do this. Once it is installed, then go ahead with the other package.
root [rover]% rpm --nodeps -i gettext-0.17-1.aix5.1.ppc.rpm
Make sure to resolve other dependencies (if any) later if you are following this.

Resources