* [ptxdist] 32 or 64 bits file offsets?
@ 2013-12-07 16:47 Felix Mellmann
2013-12-07 18:40 ` Bernhard Walle
0 siblings, 1 reply; 5+ messages in thread
From: Felix Mellmann @ 2013-12-07 16:47 UTC (permalink / raw)
To: ptxdist
Hello,
I'm currently investigating, why SVN (subversion) does not work properly
when built for ptxdist. (At first curious segfault, now corrupt data)
I came to this thread:
https://groups.google.com/forum/#!topic/subversion_users/QX91S90YvWk
which is quite the same, that happens to me.
If I'm looking into ptxconfig I find
PTXCONF_GLOBAL_LARGE_FILE=y
In my opinion, this means, that 64 bit file offsets are used.
Now, if I run a program which checks the sizes of the types off_t, size_t
and ssize_t:
#include <stdio.h>
#include <sys/types.h>
#include <sys/uio.h>
int main(void)
{
off_t off;
size_t size;
ssize_t ssize;
struct iovec io_vec;
printf("sizeof(off_t)=%ld\n", sizeof(off));
printf("sizeof(size_t)=%ld\n", sizeof(size_t));
printf("sizeof(ssize_t)=%ld\n", sizeof(ssize_t));
printf("sizeof(struct iovec)=%ld\n", sizeof(struct iovec));
return 0;
}
the program returns 4 for off_t, size_t and ssize_t and 8 for struct iovec.
But 4 bytes * 8 bit/byte gives 32 bit.
Could someone please explain me, where I am wrong?
I already tried to recompile my project with GLOBAL_LARGE_FILE disabled, but
without any success for subversion.
Thank you a lot,
Felix
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] 32 or 64 bits file offsets?
2013-12-07 16:47 [ptxdist] 32 or 64 bits file offsets? Felix Mellmann
@ 2013-12-07 18:40 ` Bernhard Walle
2013-12-08 8:14 ` Felix Mellmann
0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Walle @ 2013-12-07 18:40 UTC (permalink / raw)
To: ptxdist
* Felix Mellmann <felix.mellmann@googlemail.com> [2013-12-07 17:47]:
>
> If I'm looking into ptxconfig I find
> PTXCONF_GLOBAL_LARGE_FILE=y
> In my opinion, this means, that 64 bit file offsets are used.
No, not in general. This flag "just" sets --enable-lfs or
--enable-largefile as configure option for programs that support it.
Grep for 'PTXCONF_GLOBAL_LARGE_FILE' and 'GLOBAL_LARGE_FILE_OPTION'.
It doesn't set compile flags directly.
Regards,
Bernhard
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] 32 or 64 bits file offsets?
2013-12-07 18:40 ` Bernhard Walle
@ 2013-12-08 8:14 ` Felix Mellmann
2013-12-09 14:13 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: Felix Mellmann @ 2013-12-08 8:14 UTC (permalink / raw)
To: ptxdist
Bernhard Walle <bernhard@...> writes:
> No, not in general. This flag "just" sets --enable-lfs or
> --enable-largefile as configure option for programs that support it.
> Grep for 'PTXCONF_GLOBAL_LARGE_FILE' and 'GLOBAL_LARGE_FILE_OPTION'.
>
> It doesn't set compile flags directly.
D'oh! But your clue was the right direction.
The problem lies in how apr (Apache Portable Runtime) detects how to use
large file support. On the one hand side it detects, that additional CFLAGS
are not needed on the other hand side it detects, that off_t should be
redefined as off64_t (which is ok for my x86-64 machine).
As I'm using apr-1.4.8 instead of current shipped apr-0.9.20, I'm going to
investigate, if this happens also to apr-0.9.20.
If so, I would post a patch. This patch should include selectable large file
support as well?
Felix
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] 32 or 64 bits file offsets?
2013-12-08 8:14 ` Felix Mellmann
@ 2013-12-09 14:13 ` Michael Olbrich
2013-12-26 19:19 ` Felix Mellmann
0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2013-12-09 14:13 UTC (permalink / raw)
To: ptxdist
On Sun, Dec 08, 2013 at 08:14:37AM +0000, Felix Mellmann wrote:
> Bernhard Walle <bernhard@...> writes:
> > No, not in general. This flag "just" sets --enable-lfs or
> > --enable-largefile as configure option for programs that support it.
> > Grep for 'PTXCONF_GLOBAL_LARGE_FILE' and 'GLOBAL_LARGE_FILE_OPTION'.
> >
> > It doesn't set compile flags directly.
>
> D'oh! But your clue was the right direction.
> The problem lies in how apr (Apache Portable Runtime) detects how to use
> large file support. On the one hand side it detects, that additional CFLAGS
> are not needed on the other hand side it detects, that off_t should be
> redefined as off64_t (which is ok for my x86-64 machine).
>
> As I'm using apr-1.4.8 instead of current shipped apr-0.9.20, I'm going to
> investigate, if this happens also to apr-0.9.20.
> If so, I would post a patch. This patch should include selectable large file
> support as well?
Don't add an extra option. Just use PTXCONF_GLOBAL_LARGE_FILE.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] 32 or 64 bits file offsets?
2013-12-09 14:13 ` Michael Olbrich
@ 2013-12-26 19:19 ` Felix Mellmann
0 siblings, 0 replies; 5+ messages in thread
From: Felix Mellmann @ 2013-12-26 19:19 UTC (permalink / raw)
To: ptxdist
Michael Olbrich <m.olbrich@...> writes:
>
>
> Don't add an extra option. Just use PTXCONF_GLOBAL_LARGE_FILE.
>
> Michael
>
At last, I didn't investigate on how to enable proper large file support for
Apache Portable Runtime (apr), but I'd like to suggest a patch which will
override sizeof(off_t) to be in line with sizeof(size_t). In case of a 64
bit cross compiling host, sizeof(off_t) will lead to a value of 8 instead of 4.
In my particular case, using subversion (svn) fails with unexpected errors.
Since APR is used by apache webserver as well, modifing sizeof(off_t) will
also have an effect on apache but this is untested.
The maintainers may add my address and name as signed-off.
Regards,
Felix
diff -urdN ptxdist-2013.12.0/rules/apr.make
ptxdist-2013.12.0.debugged/rules/apr.make
--- ptxdist-2013.12.0/rules/apr.make 2013-12-18 10:48:42.000000000 +0100
+++ ptxdist-2013.12.0.debugged/rules/apr.make 2013-12-26
20:05:11.205107001 +0100
@@ -32,6 +32,7 @@
APR_CONF_ENV := \
$(CROSS_ENV) \
ac_cv_file__dev_zero=yes \
+ ac_cv_sizeof_off_t=4 \
ac_cv_sizeof_size_t=4 \
ac_cv_sizeof_ssize_t=4 \
ac_cv_struct_rlimit=yes \
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-26 19:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-07 16:47 [ptxdist] 32 or 64 bits file offsets? Felix Mellmann
2013-12-07 18:40 ` Bernhard Walle
2013-12-08 8:14 ` Felix Mellmann
2013-12-09 14:13 ` Michael Olbrich
2013-12-26 19:19 ` Felix Mellmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox