* port freadahead.c & fseeko.c
@ 2020-12-23 21:56 Ron Eggler
2020-12-24 0:17 ` Paul Eggert
2020-12-24 1:38 ` Bruno Haible
0 siblings, 2 replies; 10+ messages in thread
From: Ron Eggler @ 2020-12-23 21:56 UTC (permalink / raw)
To: bug-gnulib
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
Hi,
I'm attemprting to compile an image for a DIGI UL6 SBC and am getting the
following error:
../../m4-1.4.17/lib/freadahead.c: In function ‘freadahead’:
../../m4-1.4.17/lib/freadahead.c:91:3: error: #error "Please port gnulib
freadahead.c to your platform! Look at the definition of fflush, fread,
ungetc on your system, then report this to bug-gnulib."
91 | #error "Please port gnulib freadahead.c to your platform! Look at
the definition of fflush, fread, ungetc on your system, then report this to
bug-gnulib."
| ^~~~~
gcc -I. -I../../m4-1.4.17/lib
-isystem/home/ron/workspace/tmp/sysroots/x86_64-linux/usr/include
-isystem/home/ron/workspace/tmp/sysroots/x86_64-linux/usr/include -O2
-pipe -c -o vasprintf.o ../../m4-1.4.17/lib/vasprintf.c
ERROR: oe_runmake failed
make[3]: *** [Makefile:1842: freadahead.o] Error 1
make[3]: *** Waiting for unfinished jobs....
../../m4-1.4.17/lib/fseeko.c: In function ‘rpl_fseeko’:
../../m4-1.4.17/lib/fseeko.c:109:4: error: #error "Please port gnulib
fseeko.c to your platform! Look at the code in fseeko.c, then report this
to bug-gnulib."
109 | #error "Please port gnulib fseeko.c to your platform! Look at the
code in fseeko.c, then report this to bug-gnulib."
How can I patch these files to work with my platform?
Ron
[-- Attachment #2: Type: text/html, Size: 1501 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-23 21:56 port freadahead.c & fseeko.c Ron Eggler
@ 2020-12-24 0:17 ` Paul Eggert
2020-12-28 17:39 ` Ron Eggler
2020-12-28 21:34 ` Ron Eggler
2020-12-24 1:38 ` Bruno Haible
1 sibling, 2 replies; 10+ messages in thread
From: Paul Eggert @ 2020-12-24 0:17 UTC (permalink / raw)
To: Ron Eggler; +Cc: bug-gnulib
On 12/23/20 1:56 PM, Ron Eggler wrote:
> How can I patch these files to work with my platform?
Look in your stdio.h (commonly /usr/include/stdio.h), and the files it
includes, to see how it defines ungetc etc. Then use that knowledge to
update lib/freadahead.c and lib/fseeko.c. It'll require some expertise in
low-level C hacking.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-23 21:56 port freadahead.c & fseeko.c Ron Eggler
2020-12-24 0:17 ` Paul Eggert
@ 2020-12-24 1:38 ` Bruno Haible
2020-12-24 1:59 ` Ron Eggler
1 sibling, 1 reply; 10+ messages in thread
From: Bruno Haible @ 2020-12-24 1:38 UTC (permalink / raw)
To: bug-gnulib; +Cc: Ron Eggler
Ron Eggler wrote:
> I'm attemprting to compile an image for a DIGI UL6 SBC and am getting the
> following error:
> ../../m4-1.4.17/lib/freadahead.c: In function ‘freadahead’:
> ../../m4-1.4.17/lib/freadahead.c:91:3: error: #error "Please port gnulib
> freadahead.c to your platform! Look at the definition of fflush, fread,
> ungetc on your system, then report this to bug-gnulib."
> 91 | #error "Please port gnulib freadahead.c to your platform! Look at
> the definition of fflush, fread, ungetc on your system, then report this to
> bug-gnulib."
> | ^~~~~
You didn't say which operating system you have on your "DIGI UL6 SBC".
Therefore I'd recommend to try the newest m4 tarball, from
https://gitlab.com/gnu-m4/ci-distcheck/-/jobs/artifacts/master/raw/m4-snapshot.tar?job=check-optimized
instead of m4-1.4.17. This tarball supports more operating systems than
the one of m4-1.4.17 (because it uses the newest gnulib).
Bruno
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-24 1:38 ` Bruno Haible
@ 2020-12-24 1:59 ` Ron Eggler
0 siblings, 0 replies; 10+ messages in thread
From: Ron Eggler @ 2020-12-24 1:59 UTC (permalink / raw)
To: Bruno Haible, bug-gnulib
On 2020-12-23 5:38 p.m., Bruno Haible wrote:
> Ron Eggler wrote:
>> I'm attemprting to compile an image for a DIGI UL6 SBC and am getting the
>> following error:
>> ../../m4-1.4.17/lib/freadahead.c: In function ‘freadahead’:
>> ../../m4-1.4.17/lib/freadahead.c:91:3: error: #error "Please port gnulib
>> freadahead.c to your platform! Look at the definition of fflush, fread,
>> ungetc on your system, then report this to bug-gnulib."
>> 91 | #error "Please port gnulib freadahead.c to your platform! Look at
>> the definition of fflush, fread, ungetc on your system, then report this to
>> bug-gnulib."
>> | ^~~~~
> You didn't say which operating system you have on your "DIGI UL6 SBC".
>
> Therefore I'd recommend to try the newest m4 tarball, from
> https://gitlab.com/gnu-m4/ci-distcheck/-/jobs/artifacts/master/raw/m4-snapshot.tar?job=check-optimized
> instead of m4-1.4.17. This tarball supports more operating systems than
> the one of m4-1.4.17 (because it uses the newest gnulib).
Hi Bruno,
Thanks for your reply. We are running Linux on the SBC which should be
fine with m4-1.4.17 should it not?
>
> Bruno
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-24 0:17 ` Paul Eggert
@ 2020-12-28 17:39 ` Ron Eggler
2020-12-28 19:16 ` Paul Eggert
2020-12-28 21:34 ` Ron Eggler
1 sibling, 1 reply; 10+ messages in thread
From: Ron Eggler @ 2020-12-28 17:39 UTC (permalink / raw)
To: Paul Eggert; +Cc: bug-gnulib
Paul,
Mind, I'm I am cross compiling
So I cd-ed to:
/home/ron/novax-prs/tmp/work/x86_64-linux/m4-native/1.4.17-r0/build/lib/
and opened: ../../m4-1.4.17/lib/fseeko.c
but funny enough, I cannot find any function that is called "rpl_fseeko"
even though the error states:
| make[3]: Entering directory
'/home/ron/novax-prs/tmp/work/x86_64-linux/m4-native/1.4.17-r0/build/lib'
| gcc -I. -I../../m4-1.4.17/lib
-isystem/home/ron/novax-prs/tmp/sysroots/x86_64-linux/usr/include
-isystem/home/ron/novax-prs/tmp/sysroots/x86_64-linux/usr/include -O2
-pipe -c -o freadahead.o ../../m4-1.4.17/lib/freadahead.c
| gcc -I. -I../../m4-1.4.17/lib
-isystem/home/ron/novax-prs/tmp/sysroots/x86_64-linux/usr/include
-isystem/home/ron/novax-prs/tmp/sysroots/x86_64-linux/usr/include -O2
-pipe -c -o fseeko.o ../../m4-1.4.17/lib/fseeko.c
| ../../m4-1.4.17/lib/fseeko.c: In function ‘rpl_fseeko’:
| ../../m4-1.4.17/lib/fseeko.c:109:4: error: #error "Please port gnulib
fseeko.c to your platform! Look at the code in fseeko.c, then report
this to bug-gnulib."
| 109 | #error "Please port gnulib fseeko.c to your platform! Look
at the code in fseeko.c, then report this to bug-gnulib."
On 2020-12-23 4:17 p.m., Paul Eggert wrote:
> On 12/23/20 1:56 PM, Ron Eggler wrote:
>> How can I patch these files to work with my platform?
>
> Look in your stdio.h (commonly /usr/include/stdio.h), and the files it
> includes, to see how it defines ungetc etc. Then use that knowledge to
> update lib/freadahead.c and lib/fseeko.c. It'll require some expertise
> in low-level C hacking.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-28 17:39 ` Ron Eggler
@ 2020-12-28 19:16 ` Paul Eggert
0 siblings, 0 replies; 10+ messages in thread
From: Paul Eggert @ 2020-12-28 19:16 UTC (permalink / raw)
To: Ron Eggler; +Cc: bug-gnulib
On 12/28/20 9:39 AM, Ron Eggler wrote:
> I cannot find any function that is called "rpl_fseeko"
Presumably an earlier "#define fseeko rpl_fseeko" means that when you
see a definition of the fseeko function, it's really defining rpl_fseeko.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-24 0:17 ` Paul Eggert
2020-12-28 17:39 ` Ron Eggler
@ 2020-12-28 21:34 ` Ron Eggler
2020-12-28 22:08 ` Bruno Haible
1 sibling, 1 reply; 10+ messages in thread
From: Ron Eggler @ 2020-12-28 21:34 UTC (permalink / raw)
To: Paul Eggert; +Cc: bug-gnulib
[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]
On 2020-12-23 4:17 p.m., Paul Eggert wrote:
> On 12/23/20 1:56 PM, Ron Eggler wrote:
>> How can I patch these files to work with my platform?
>
> Look in your stdio.h (commonly /usr/include/stdio.h), and the files it
> includes, to see how it defines ungetc etc. Then use that knowledge to
> update lib/freadahead.c and lib/fseeko.c. It'll require some expertise
> in low-level C hacking.
I'm having troubles with finding the correct definition, when I grep the
sources for ungetc I get the following:
x86_64-linux$ grep -rn --include \*.h ungetc
m4-native/1.4.17-r0/m4-1.4.17/lib/stdio-impl.h:65: struct __sbuf _ub;
/* ungetc buffer */
m4-native/1.4.17-r0/m4-1.4.17/lib/freadahead.h:23: source and the bytes
that have been pushed back through 'ungetc'.
m4-native/1.4.17-r0/build/lib/config.h:96:/* Define to 1 if ungetc is
broken when used on arbitrary bytes. */
binutils-native/2.27-r0/git/zlib/zconf.h:91:# define
gzungetc z_gzungetc
binutils-native/2.27-r0/git/zlib/zlib.h:1400:ZEXTERN int ZEXPORT
gzungetc OF((int c, gzFile file));
binutils-native/2.27-r0/git/zlib/zlib.h:1404: gzungetc() returns the
character pushed, or -1 on failure. gzungetc() will
binutils-native/2.27-r0/git/zlib/zlib.h:1406: yet. If gzungetc is
used immediately after gzopen or gzdopen, at least the
ron@ENGDEV:~/novax-prs/tmp/work/x86_64-linux$
and I'm not exactly sure how I should adjust the definitions in fseeko.c
& freadaheaed.c accordingly.
As for:
On 12/28/20 9:39 AM, Ron Eggler wrote:
> I cannot find any function that is called "rpl_fseeko"
Presumably an earlier "#define fseeko rpl_fseeko" means that when you
see a definition of the fseeko function, it's really defining rpl_fseeko.
That's correct, I missed to see this!
Thanks for all!
[-- Attachment #2: Type: text/html, Size: 3169 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-28 21:34 ` Ron Eggler
@ 2020-12-28 22:08 ` Bruno Haible
2020-12-29 2:32 ` Ron Eggler
0 siblings, 1 reply; 10+ messages in thread
From: Bruno Haible @ 2020-12-28 22:08 UTC (permalink / raw)
To: bug-gnulib; +Cc: Ron Eggler
Ron Eggler wrote:
> On 2020-12-23 4:17 p.m., Paul Eggert wrote:
> > On 12/23/20 1:56 PM, Ron Eggler wrote:
> >> How can I patch these files to work with my platform?
> >
> > Look in your stdio.h (commonly /usr/include/stdio.h), and the files it
> > includes, to see how it defines ungetc etc. Then use that knowledge to
> > update lib/freadahead.c and lib/fseeko.c. It'll require some expertise
> > in low-level C hacking.
>
> I'm having troubles with finding the correct definition, when I grep the
> sources for ungetc I get the following:
>
> x86_64-linux$ grep -rn --include \*.h ungetc
> m4-native/1.4.17-r0/m4-1.4.17/lib/stdio-impl.h:65: struct __sbuf _ub;
> /* ungetc buffer */
Ron,
Please don't waste Paul's time. You got the answer already:
https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00197.html
Bruno
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-28 22:08 ` Bruno Haible
@ 2020-12-29 2:32 ` Ron Eggler
2020-12-29 3:48 ` Bruno Haible
0 siblings, 1 reply; 10+ messages in thread
From: Ron Eggler @ 2020-12-29 2:32 UTC (permalink / raw)
To: Bruno Haible, bug-gnulib
On 2020-12-28 2:08 p.m., Bruno Haible wrote:
> Ron Eggler wrote:
>> On 2020-12-23 4:17 p.m., Paul Eggert wrote:
>>> On 12/23/20 1:56 PM, Ron Eggler wrote:
>>>> How can I patch these files to work with my platform?
>>> Look in your stdio.h (commonly /usr/include/stdio.h), and the files it
>>> includes, to see how it defines ungetc etc. Then use that knowledge to
>>> update lib/freadahead.c and lib/fseeko.c. It'll require some expertise
>>> in low-level C hacking.
>> I'm having troubles with finding the correct definition, when I grep the
>> sources for ungetc I get the following:
>>
>> x86_64-linux$ grep -rn --include \*.h ungetc
>> m4-native/1.4.17-r0/m4-1.4.17/lib/stdio-impl.h:65: struct __sbuf _ub;
>> /* ungetc buffer */
> Ron,
>
> Please don't waste Paul's time. You got the answer already:
>
> https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00197.html
My apologies, I didn't mean to waste anyone's time! As for your answer,
I have downloaded, extracted & copied the new directory (m4-2020-12-26/)
parallel to the existing m4-native/ directory but have not been able to
update the paths correctly yet.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: port freadahead.c & fseeko.c
2020-12-29 2:32 ` Ron Eggler
@ 2020-12-29 3:48 ` Bruno Haible
0 siblings, 0 replies; 10+ messages in thread
From: Bruno Haible @ 2020-12-29 3:48 UTC (permalink / raw)
To: Ron Eggler; +Cc: bug-gnulib
Ron Eggler wrote:
> I have downloaded, extracted & copied the new directory (m4-2020-12-26/)
Yes, this tarball works fine. Unlike the m4-1.4.17 one.
Bruno
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-12-29 3:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 21:56 port freadahead.c & fseeko.c Ron Eggler
2020-12-24 0:17 ` Paul Eggert
2020-12-28 17:39 ` Ron Eggler
2020-12-28 19:16 ` Paul Eggert
2020-12-28 21:34 ` Ron Eggler
2020-12-28 22:08 ` Bruno Haible
2020-12-29 2:32 ` Ron Eggler
2020-12-29 3:48 ` Bruno Haible
2020-12-24 1:38 ` Bruno Haible
2020-12-24 1:59 ` Ron Eggler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).