Re: Error in compiling rcs and diffutils
Costantino Carmignani <[email protected]> Sat, 28 Nov 2015 20:13:24 +0100
| Newsgroups | gmane.comp.version-control.rcs.bugs |
|---|---|
| Message-ID | <CACMe037KL=Jvum4kfqpuM01H4bu-WjmDcwPNkiBfbP7CW7bwGA@mail.gmail.com> |
Dear Sir,
I thank you for the kind reply to my question.
Excuse me for disturbing you another time.
I have a little experience (less tha 1 year) on working with systems based
on UNIX/LINUX.
For more than 35 years I developed several programs of structural analysis
for my students as full professor of Machine Design at University of Pisa
(Italy).
I used as languages Fortran, Basic, Quick Basic, XBasic, all under DOS or
Windows.
Now, retired, I would like to transfer these programs in C++ and then, if
it is possible, giving applications in OS X, iOS, Android, all free.
Due to my inexperience in UNI/LINUX system my following question can be
naive.
1 - For a correct compiling C programs it is necessary that the stdio.h is
contained in /usr/include/stdio.h ?
If yes, I found stdio.h in my PC in these positions:
--- in iMac with OS X El Capitain (version 10.11.3) -->
/usr/local/include/c++/5.0.0/tr1/stdio.h
--- in other PC with OS Linux (Ubuntu 15.10) -->
/usr/include/c++/5.2.1 --> 5/tr1/stdio.h
2 - It is it possible to make a new directory named include as subdirectory
of /usr/ , that is /usr/include/ .
This procedure can be detrimental for the functions of the system?
3 - copy or link stdio.h from actual position to this new subdirectory?
4 - Other files must be inserted in /usr/include/ for a correct compiling
of C?
Thank you in advance.
Sincerely yours.
Costantino Carmignani
[email protected]
2015-11-22 16:32 GMT+01:00 Thien-Thi Nguyen <[email protected]>:
> () Costantino Carmignani <[email protected]>
> () Sat, 21 Nov 2015 21:07:48 +0100
>
> configure : error : cannot run C compiled programs
>
> I am not so able to "decode" all the informations recorded in
> config.log. I enclose the files config.log produced by
> diffutils and rcs
>
> May you give me some helps?
>
> In both attached log files, we can search for this error message
> and look backward to discover the context, trying to correlate
> the lines we see in the log file w/ the messages we see as a
> result of invoking ‘./configure’. For example, in one of them,
> we see:
>
> configure:4502: checking for C compiler default output file name
> configure:4504: result: a.out
> configure:4510: checking for suffix of executables
> configure:4517: gcc -o conftest conftest.c >&5
> configure:4521: $? = 0
> configure:4543: result:
> configure:4565: checking whether we are cross compiling
> configure:4573: gcc -o conftest conftest.c >&5
> conftest.c:11:19: fatal error: stdio.h: No such file or directory
> compilation terminated.
> configure:4577: $? = 1
> configure:4584: ./conftest
> ./configure: line 4586: ./conftest: No such file or directory
> configure:4588: $? = 127
> configure:4595: error: in
> `/Users/costantinocarmignani/Downloads/diffutils-3.3':
> configure:4597: error: cannot run C compiled programs.
>
> and indeed, part of the ‘./configure’ output does contain
> "checking for C compiler default output file name: a.out".
> That check apparently does not fail, and gives us a useful
> answer.
>
> So far, so good -- this correlation helps us to understand the
> next part, where the check DOES fail. What we see in the log
> file lines between the successful check and the final error
> message is a "fatal error" which mentions stdio.h, and
> furthermore tells us that that file is missing or otherwise
> unreadable.
>
> All this is to say that we need to find out which package(s) on
> those systems we must install to have access to stdio.h. On
> Debian systems, we can use ‘dpkg -S’:
>
> $ dpkg -S stdio.h
> libunistring-dev:i386: /usr/include/unistdio.h
> libstdc++6-4.4-dev: /usr/include/c++/4.4/tr1/stdio.h
> libstdc++6-4.7-dev: /usr/include/c++/4.7/tr1/stdio.h
> libglib2.0-dev: /usr/include/glib-2.0/glib/gstdio.h
> libc6-dev:i386: /usr/include/stdio.h
> libc6-dev:i386: /usr/include/i386-linux-gnu/bits/stdio.h
> perl: /usr/lib/perl/5.14.2/CORE/nostdio.h
>
> Of these handful of packages, the one we need is the one
> containing /usr/include/stdio.h, hence ‘libc6-dev’. We should
> make sure that package is installed and once sure, try back here
> again, hopefully to get further along.
>
> Overall, this troubleshooting process works on most platforms.
>
> --
> Thien-Thi Nguyen -----------------------------------------------
> (if you're human and you know it) read my lisp:
> (defun responsep (type via)
> (case type
> (technical (eq 'mailing-list via))
> ...))
> ---------------------------------------------- GPG key: 4C807502
>
--
Costantino Carmignani