Compiling c with libtasn1.h - c

I know a little bit about gcc and am decent with linux but I cannot for the life of me get my c program with libtasn1 to compile. I downloaded the package from the website and then tried to compile and I get nothing. I even tried sudo apt-get install libtasn1-3-bin and that did not help either. I really have no clue what else to try, but I am beginning to think I need to add some sort of linking to GCC but like I said I am really unsure. Any help would be awesome.

Try
sudo apt-get install libtasn1-3-dev
and compile (link, actually) your program with
gcc ... -ltasn1
By the way, according to the nameing convention of Debian, package names ended with -dev usually include the files, such as header files, dynamic libraries, needed for development.

Related

Using libwebsockets with LWS_ROLE_WS

I compiled libwebsockets using:
cmake
make all
sudo make install
ldconfig
I'm trying to compile an example, but CMake gives the error that lws must have been configured with LWS_ROLE_WS. I cannot work out how to 'create' lws with that option.
I'm quite happy with makefiles, but I know little about CMake, and here the configuration appears to be very complicated. The build instructions include some options, but nothing relating to this.
Basically, I don't even understand where I should be looking; is it necessary to be fluent in CMake to use libwebsockets?

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

bsd-finger won't Make correctly

I ran across an interesting issue. My system is Arch Linux (latest) on an ASUS laptop. Now, the really weird issue:
finger is not automatically installed with Arch. I attempted to use pacman to install it, and it's not in the repositories. It IS in the AUR.
I downloaded the AUR file, un-tarred the tar with tar -xvf bsd-finger0.17.tar.gz. This created the directory folder with the same name. I ran ./configure which gave the expected output:
` /usr/man
Looking for a C compiler... gcc
Checking if gcc accepts gcc warnings... yes
Checking if gcc accepts -O2... yes
Checking for socklen_t... yes
Checking for snprintf declaration... ok
Checking for snprintf implementation... ok
Generating MCONFIG...`
Then I tried to make, and got this weird tidbit: http://pastebin.com/0qACttCu
So, it looks like it's having weird compiling issues. Any ideas on what's up here?
I have no idea what AUR is, but it seems you are not using it the way it is supposed to be used.
https://wiki.archlinux.org/index.php/Arch_User_Repository#Build_and_install_the_package
That wiki says that you should build an AUR package with "makepkg"
But anyway looking at
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=netkit-bsd-finger
It seems you just need to add time.h as include to two files and it should compile.

How to install packages or natively compile package on a minimal Linux kernel compiled with Buildroot

I enconter a problem I hope to be solved quickly.
I have grace to BUILDROOT compile a Linux zImage Kernel, build a rootfs, have a bootloader, so everething is right.
But at the boot, the system is so minimal that i don't have got some package manager like apt-get, yum, etc....
Despite the fact i've got the network (wget is possible), I don't know how to have a simply gcc in my host (Buildroot don't permit to compile gcc anymore)
or more simply a package manager.
It is so boring to cross compile everything that I think the better solution is to apt-get packages, resolve dependencies and install it for an ARM architecture..
I recompile with Package manager options including IPKG and OPKG but the repositories don't work and the commands return nothing (I.E. ipkg --list, etc..)
Did someone had the same problems and what is the best way to have a good Package Manager on a minimal system compiled and build grace to Buildroot.
What is the best way to have anymore a Native compile toolchain on the ARM host ?
Thanks to your answers
My purpose is to natively compile my code including -lm -lpthread and LIRC module and header files on this minimal host system.
Stefan, France
---- additional informations ---
hello,
i refresh this tag for set informations :
recently buildroot does no longer permit natively compile gcc package
even if make and other tools are available on the recent buildroot distribution
gcc and other tags are marked as deprecated
so it is needed / obligated to cross compile on the host
so what i did
for convenience, i've the Makefile for my code with dependencies
for pthread and lirc_client
If anybody interested, ask me,
stef, France
The Buildroot reference documentation has plenty of details about these questions. Please see http://buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target and http://buildroot.org/downloads/manual/manual.html#faq-no-binary-packages.
I've added dpkg inside buildroot in order to have dpkg on my board... it was really easy to do.
The only thing I had to hack is to create a fake ldconfig.

Cygwin shadow.h not found

I am trying to compile a program in Cygwin and it requires shadow.h in one of the source files, which is missing in the /usr/include path. How do I add shadow support in Cygwin ? any packages to install ?
In CentOS, just installing gcc and glibc provided the shadow.h header file. what are the equivalent packages that I need to install in Cygwin ?
shadow.h is to define the type struct spwd, and it is a part of Gnulib.Your compilation is not getting support of this lib.
There should be a libshadow.a in /usr/lib and you need to include it during build as follows
gcc program.c -o program -lshadow
for better understanding you can look here also.
Edited Later:
I just got to know there is some issues in porting of shadow.h and this problem covers cygwin too.Please refer here.
There is none currently, so this isn't going to work until someone contributes those APIs to Cygwin.

Resources