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.
Related
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
I have the MinGW install previously working fine with MSYS. They are installed properly and functioning just well.
I installed the PortAudio library and did the install and got the success message after:
./configure
make
make install
When I try to compile samples:
c:\c>gcc patest_mono.c -o pa.exe
patest_mono.c:50:23: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^
compilation terminated.
I'm new. I have a feeling I might be doing something fundamentally wrong with the way I'm trying to create the exe from compiling. It's been somewhat of a puzzle quest so far, but I've tried to figure it out and think I am close but completely missing something.
PATH variable ?
In the PortAudio MinGW build instructions I noticed
"The above should create a working version though you might want to
provide '–prefix=<path-to-install-dir>' to configure. "
I've tried adding C:\MingW\PortAudio into the user path. Doesn't work.
I've also tried running the commands in Bash and they come back with an error message "No Rule to make target 'paexpink'" either with the make command, and with gcc .c -o .exe I just get the same error message as compiling straight from the cmd prompt.
I found another source on stack overflow thread with no answers, but the user had commented that http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio provided them a solution but I tried installing the 5 cpython binaries and under the assumption I did it right, it didn't work either.
Thanks for your help,
Julian
To build and install portaudio, you need to add -prefix=/c/<"path to base of the MinGW directory"> to the ./configure line.
For example: ./configure -prefix=/c/MinGW/
then continue the installation by doing
make
After that, do the
make install
and that should install the portaudio files into MinGW.
After it has finished installing, you need to add -lportaudio to the compile command whenever you compile any programs that you want to use PortAudio in.
For example: gcc -o test test.c -lportaudio
I just figured out how to do this today, so I may have accidentally forgotten a few steps.
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.
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.
I am trying to run a MPI program with C language.
I have installed GCC compiler and the openmpi libraries. I am running ubuntu Linux and Netbeans IDE. My challenge is that after including ‘mpi.h’ in my header file and compiling the application, I still get ‘fatal error : cannot find file mpi.c’. I have the files in home/user/lib/openmpi/include, but I cant get it too work.
Can anyone help?
You could try to change the compiler to /path/mpicc and the debugger to mpirun. This should work, although I did not test it, but probably the best way to compile MPI code is via terminal.
If you really depend on the IDE you cound try writing your code with it (to take advantage of auto-completion and such) and compile it in terminal using mpicc -o main.exe main.cpp [other .cpp files] and run it with mpirun -np number_of_processes_to_use ./main.exe [args]. You could write a small script or a Makefile to do it all in one command.
Good luck!
to save yourself some sanity, I'd recommend opening up a terminal and going from there (at least until you figure out what's what).
Also, using the mpi compiler to do things would simplify your life. (and likely automatically solve the missing source issue, as it should know where they are by default).
If you still can't locate them during compile then I'd look at adding the location where mpi.c & mpi.h are located to your C Include Path: How to add a default include path for gcc in linux?