Discussion:
[gem5-dev] Compilation error for gem5 after statfs change
(too old to reply)
Jason Lowe-Power
2017-01-24 22:08:12 UTC
Permalink
Hi Brandon,

I think this is a "real" bug:
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt.
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.

Thanks,
Jason
Bjoern A. Zeeb
2017-01-24 23:46:25 UTC
Permalink
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt.
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD as
well? There are at least 3 different checks for that code; if people
don’t care about “style” I could get it right, but ..

diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);

+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));

tgt.copyOut(mem);
Jason Lowe-Power
2017-01-25 22:18:46 UTC
Permalink
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.

If we are going to say that we have support for OSes other than Linux, we
need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI service (
https://travis-ci.org/powerjg/gem5-ci-test). We could probably hook this up
to our gem5 github page, if it works out.

Another important point, though, is that we can't expect all committers to
own multiple machines to test their changes on. We need something that will
do pre-commit builds on all the platforms we claim to support.

We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I don't
think it will support multiple OS builds).

Do others have any ideas on a long-term solution here?

Cheers,
Jason

On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD as
well? There are at least 3 different checks for that code; if people
don’t care about “style” I could get it right, but ..

diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);

+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));

tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
gem5-***@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev
Andreas Hansson
2017-01-26 08:17:38 UTC
Permalink
Hi all,

While I agree about the end goal (test every commit on every platform) I
would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?

With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be wrong,
but I would think this is a very good filter, with a fairly low cost and
effort of deployment. Virtualbox + some flavour of BSD would do it.

Andreas

On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than Linux, we
need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI service (
https://travis-ci.org/powerjg/gem5-ci-test). We could probably hook this up
to our gem5 github page, if it works out.
Another important point, though, is that we can't expect all committers to
own multiple machines to test their changes on. We need something that will
do pre-commit builds on all the platforms we claim to support.
We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I don't
think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD as
well? There are at least 3 different checks for that code; if people
don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Potter, Brandon
2017-01-26 17:04:19 UTC
Permalink
Hello all,

I'm trying to resolve this issue. I'm setting up FreeBSD 11 on a VirtualBox instance now to see if I can resolve the problems. Hopefully this covers OSX indirectly as well.

I don't expect that moving the offending system calls into Linux specific files will resolve the problem where the underlying host OS needs to make the system call on behalf of the target (like what happens with fallocate). I think the only way to resolve the issue is to add in preprocessor directives to prevent compilation/linkage errors on platforms that don't support what's necessary under the covers. (Correct me if there's a better way to handle this.)

I'll post a patch and respond to the mailing list when I have it working.

Regards,
Brandon

-----Original Message-----
From: gem5-dev [mailto:gem5-dev-***@gem5.org] On Behalf Of Andreas Hansson
Sent: Thursday, January 26, 2017 2:18 AM
To: gem5 Developer List <gem5-***@gem5.org>
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change

Hi all,

While I agree about the end goal (test every commit on every platform) I would suggest we go about this one step at a time. The likelihood of breakage is only high for anything related to syscall emulation, so it really only affects a small part of the developer community. Agreed?

With that in mind I think we can prevent 99% of the issues if syscall emulation patches are built on a BSD system with clang. I would be wrong, but I would think this is a very good filter, with a fairly low cost and effort of deployment. Virtualbox + some flavour of BSD would do it.

Andreas

On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than Linux,
we need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI
service ( https://travis-ci.org/powerjg/gem5-ci-test). We could
probably hook this up to our gem5 github page, if it works out.
Another important point, though, is that we can't expect all committers
to own multiple machines to test their changes on. We need something
that will do pre-commit builds on all the platforms we claim to
support.
We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I
don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-bu
ild
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
gem5-***@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev
Bjoern A. Zeeb
2017-01-26 17:50:23 UTC
Permalink
On 26 Jan 2017, at 17:04, Potter, Brandon wrote:

Hi,

in case you are having troubles getting gem5 compiling on it in general
please give me a shout as I might have fixes that are either in review
or on my local disk and I am more than happy to work with someone to
make sure they are all in.

/bz
Post by Potter, Brandon
Hello all,
I'm trying to resolve this issue. I'm setting up FreeBSD 11 on a
VirtualBox instance now to see if I can resolve the problems.
Hopefully this covers OSX indirectly as well.
I don't expect that moving the offending system calls into Linux
specific files will resolve the problem where the underlying host OS
needs to make the system call on behalf of the target (like what
happens with fallocate). I think the only way to resolve the issue is
to add in preprocessor directives to prevent compilation/linkage
errors on platforms that don't support what's necessary under the
covers. (Correct me if there's a better way to handle this.)
I'll post a patch and respond to the mailing list when I have it working.
Regards,
Brandon
-----Original Message-----
Sent: Thursday, January 26, 2017 2:18 AM
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change
Hi all,
While I agree about the end goal (test every commit on every platform)
I would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be
wrong, but I would think this is a very good filter, with a fairly low
cost and effort of deployment. Virtualbox + some flavour of BSD would
do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than Linux,
we need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI
service ( https://travis-ci.org/powerjg/gem5-ci-test). We could
probably hook this up to our gem5 github page, if it works out.
Another important point, though, is that we can't expect all
committers
to own multiple machines to test their changes on. We need something
that will do pre-commit builds on all the platforms we claim to
support.
We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I
don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-bu
ild
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
Andreas Hansson
2017-01-26 18:23:20 UTC
Permalink
Thanks Brandon!

For those attending the workshop at HPCA, it would be great if you could
spend a few minutes and see if you can come up with some recommendations
around this.

Andreas

On 26/01/2017, 18:04, "gem5-dev on behalf of Potter, Brandon"
Post by Potter, Brandon
Hello all,
I'm trying to resolve this issue. I'm setting up FreeBSD 11 on a
VirtualBox instance now to see if I can resolve the problems. Hopefully
this covers OSX indirectly as well.
I don't expect that moving the offending system calls into Linux specific
files will resolve the problem where the underlying host OS needs to make
the system call on behalf of the target (like what happens with
fallocate). I think the only way to resolve the issue is to add in
preprocessor directives to prevent compilation/linkage errors on
platforms that don't support what's necessary under the covers. (Correct
me if there's a better way to handle this.)
I'll post a patch and respond to the mailing list when I have it working.
Regards,
Brandon
-----Original Message-----
Sent: Thursday, January 26, 2017 2:18 AM
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change
Hi all,
While I agree about the end goal (test every commit on every platform) I
would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be wrong,
but I would think this is a very good filter, with a fairly low cost and
effort of deployment. Virtualbox + some flavour of BSD would do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than Linux,
we need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI
service ( https://travis-ci.org/powerjg/gem5-ci-test). We could
probably hook this up to our gem5 github page, if it works out.
Another important point, though, is that we can't expect all committers
to own multiple machines to test their changes on. We need something
that will do pre-commit builds on all the platforms we claim to
support.
We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I
don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-bu
ild
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy
the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Jason Lowe-Power
2017-01-26 23:55:13 UTC
Permalink
Hi Brandon,

BTW, here's a Travis-CI config file that will run tests on GCC and Clang on
both Mac and Linux hosts. We can add many more parameters for different
versions of compilers, etc., but this is something that should allow you to
test changes on more than just your current platform.

If you have a github mirror, every time you push to it, Travis-CI kicks off
4 builds (for the matrix of OS and compiler).

https://github.com/powerjg/gem5-ci-test/blob/master/.travis.yml

It would be great if you could take a look at this, Brandon.

Thanks,
Jason
Post by Andreas Hansson
Hi all,
While I agree about the end goal (test every commit on every platform) I
would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be wrong,
but I would think this is a very good filter, with a fairly low cost and
effort of deployment. Virtualbox + some flavour of BSD would do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and others
when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than Linux, we
need to at least verify gem5 builds on these OSes, preferably before
accepting a commit. I'm currently testing out the free Travis-CI service (
https://travis-ci.org/powerjg/gem5-ci-test). We could probably hook this up
to our gem5 github page, if it works out.
Another important point, though, is that we can't expect all committers to
own multiple machines to test their changes on. We need something that will
do pre-commit builds on all the platforms we claim to support.
We're in the middle of moving the regression tests to a hosted jenkins
instance. Hopefully this will solve some of these issues (though I don't
think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build
Post by Jason Lowe-Power
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD as
well? There are at least 3 different checks for that code; if people
don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose the
contents to any other person, use it for any purpose, or store or copy the
information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
Beckmann, Brad
2017-01-28 20:21:23 UTC
Permalink
I must chime in here.

Brandon is putting in an heroic effort here and you keep asking him to do more and more. I'm really concerned with the precedent being set. I do not believe there has ever been a consensus that gem5 supports any OS other than Linux. Once we have a common public regression tester infrastructure that allows us to test multiple OSes, then we can officially add other OSes if people add the tests to do so. However until that happens, can someone who actually cares about these non-standard environments run these tests?

Brad



-----Original Message-----
From: gem5-dev [mailto:gem5-dev-***@gem5.org] On Behalf Of Jason Lowe-Power
Sent: Thursday, January 26, 2017 3:55 PM
To: gem5 Developer List <gem5-***@gem5.org>; Potter, Brandon <***@amd.com>
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change

Hi Brandon,

BTW, here's a Travis-CI config file that will run tests on GCC and Clang on both Mac and Linux hosts. We can add many more parameters for different versions of compilers, etc., but this is something that should allow you to test changes on more than just your current platform.

If you have a github mirror, every time you push to it, Travis-CI kicks off
4 builds (for the matrix of OS and compiler).

https://github.com/powerjg/gem5-ci-test/blob/master/.travis.yml

It would be great if you could take a look at this, Brandon.

Thanks,
Jason
Post by Andreas Hansson
Hi all,
While I agree about the end goal (test every commit on every platform)
I would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be
wrong, but I would think this is a very good filter, with a fairly low
cost and effort of deployment. Virtualbox + some flavour of BSD would do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and
others when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than
Linux, we need to at least verify gem5 builds on these OSes,
preferably before accepting a commit. I'm currently testing out the
free Travis-CI service ( https://travis-ci.org/powerjg/gem5-ci-test).
We could probably hook this up to our gem5 github page, if it works
out.
Another important point, though, is that we can't expect all
committers to own multiple machines to test their changes on. We need
something that will do pre-commit builds on all the platforms we
claim to support.
We're in the middle of moving the regression tests to a hosted
jenkins instance. Hopefully this will solve some of these issues
(though I don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-b
uild
Post by Jason Lowe-Power
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
gem5-***@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev
Andreas Hansson
2017-02-02 09:34:39 UTC
Permalink
Hi Brad,

A few things worth noting here:

- OSX/MacOs has been working fine for the last 4+ years, and is mentioned
on gem5.org as a supported OS (so is OpenBSD btw). I know there are users
that rely on it, and I would suggest we try and keep it working.

- Clearly there is a problem in that we have plenty ‘supported’ builds
(OSX, without Python, with SystemC, etc) that are not tested or even built
as part of the regressions. Once we make the move to CI-land some of this
should be easier to address.

- For now I would suggest we simply try our best to not break things, and
for the few patches related to syscall emulation it would be great if you
can check on a OSX/BSD host before pushing (alternatively co-ordinate with
someone else to check). For the breakage that already snuck in, there are
plenty people willing to help, but they will likely need Brandon’s help to
get things resolved.

Thanks again to everyone, especially Brandon, for all help.

Andreas

On 28/01/2017, 20:21, "gem5-dev on behalf of Beckmann, Brad"
Post by Beckmann, Brad
I must chime in here.
Brandon is putting in an heroic effort here and you keep asking him to do
more and more. I'm really concerned with the precedent being set. I do
not believe there has ever been a consensus that gem5 supports any OS
other than Linux. Once we have a common public regression tester
infrastructure that allows us to test multiple OSes, then we can
officially add other OSes if people add the tests to do so. However
until that happens, can someone who actually cares about these
non-standard environments run these tests?
Brad
-----Original Message-----
Sent: Thursday, January 26, 2017 3:55 PM
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change
Hi Brandon,
BTW, here's a Travis-CI config file that will run tests on GCC and Clang
on both Mac and Linux hosts. We can add many more parameters for
different versions of compilers, etc., but this is something that should
allow you to test changes on more than just your current platform.
If you have a github mirror, every time you push to it, Travis-CI kicks off
4 builds (for the matrix of OS and compiler).
https://github.com/powerjg/gem5-ci-test/blob/master/.travis.yml
It would be great if you could take a look at this, Brandon.
Thanks,
Jason
Post by Andreas Hansson
Hi all,
While I agree about the end goal (test every commit on every platform)
I would suggest we go about this one step at a time. The likelihood of
breakage is only high for anything related to syscall emulation, so it
really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be
wrong, but I would think this is a very good filter, with a fairly low
cost and effort of deployment. Virtualbox + some flavour of BSD would do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and
others when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than
Linux, we need to at least verify gem5 builds on these OSes,
preferably before accepting a commit. I'm currently testing out the
free Travis-CI service ( https://travis-ci.org/powerjg/gem5-ci-test).
We could probably hook this up to our gem5 github page, if it works
out.
Another important point, though, is that we can't expect all
committers to own multiple machines to test their changes on. We need
something that will do pre-commit builds on all the platforms we
claim to support.
We're in the middle of moving the regression tests to a hosted
jenkins instance. Hopefully this will solve some of these issues
(though I don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-b
uild
Post by Jason Lowe-Power
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
Post by Jason Lowe-Power
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Beckmann, Brad
2017-02-02 13:35:22 UTC
Permalink
Just because someone modified the wiki a few years ago and said we support OpenBSD and OSX doesn't mean much. As your second bullet points out, there are several scenarios the wiki says gem5 supports that lack any testing infrastructure to back up those statements.

I believe Brandon wants to continue to work with you on fixing your "supported" scenarios. However, it seems more fair if those of you who use OSX or OpenBSD test out Brandon's fixes rather than asking him to set up an entire virtual machine environment that attempts to mirror your environment.

Brad



-----Original Message-----
From: gem5-dev [mailto:gem5-dev-***@gem5.org] On Behalf Of Andreas Hansson
Sent: Thursday, February 2, 2017 1:35 AM
To: gem5 Developer List <gem5-***@gem5.org>; Potter, Brandon <***@amd.com>
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change

Hi Brad,

A few things worth noting here:

- OSX/MacOs has been working fine for the last 4+ years, and is mentioned on gem5.org as a supported OS (so is OpenBSD btw). I know there are users that rely on it, and I would suggest we try and keep it working.

- Clearly there is a problem in that we have plenty ‘supported’ builds (OSX, without Python, with SystemC, etc) that are not tested or even built as part of the regressions. Once we make the move to CI-land some of this should be easier to address.

- For now I would suggest we simply try our best to not break things, and for the few patches related to syscall emulation it would be great if you can check on a OSX/BSD host before pushing (alternatively co-ordinate with someone else to check). For the breakage that already snuck in, there are plenty people willing to help, but they will likely need Brandon’s help to get things resolved.

Thanks again to everyone, especially Brandon, for all help.

Andreas

On 28/01/2017, 20:21, "gem5-dev on behalf of Beckmann, Brad"
Post by Beckmann, Brad
I must chime in here.
Brandon is putting in an heroic effort here and you keep asking him to
do more and more. I'm really concerned with the precedent being set.
I do not believe there has ever been a consensus that gem5 supports any
OS other than Linux. Once we have a common public regression tester
infrastructure that allows us to test multiple OSes, then we can
officially add other OSes if people add the tests to do so. However
until that happens, can someone who actually cares about these
non-standard environments run these tests?
Brad
-----Original Message-----
Sent: Thursday, January 26, 2017 3:55 PM
Subject: Re: [gem5-dev] Compilation error for gem5 after statfs change
Hi Brandon,
BTW, here's a Travis-CI config file that will run tests on GCC and
Clang on both Mac and Linux hosts. We can add many more parameters for
different versions of compilers, etc., but this is something that
should allow you to test changes on more than just your current platform.
If you have a github mirror, every time you push to it, Travis-CI kicks off
4 builds (for the matrix of OS and compiler).
https://github.com/powerjg/gem5-ci-test/blob/master/.travis.yml
It would be great if you could take a look at this, Brandon.
Thanks,
Jason
On Thu, Jan 26, 2017 at 4:47 AM Andreas Hansson
Post by Andreas Hansson
Hi all,
While I agree about the end goal (test every commit on every
platform) I would suggest we go about this one step at a time. The
likelihood of breakage is only high for anything related to syscall
emulation, so it really only affects a small part of the developer community. Agreed?
With that in mind I think we can prevent 99% of the issues if syscall
emulation patches are built on a BSD system with clang. I would be
wrong, but I would think this is a very good filter, with a fairly low
cost and effort of deployment. Virtualbox + some flavour of BSD would do it.
Andreas
On 25/01/2017, 23:18, "gem5-dev on behalf of Jason Lowe-Power"
Post by Jason Lowe-Power
Yeah, it's a major problem that we say that we support macOS and
others when we allow commits that break builds on these other OSes.
If we are going to say that we have support for OSes other than
Linux, we need to at least verify gem5 builds on these OSes,
preferably before accepting a commit. I'm currently testing out the
free Travis-CI service ( https://travis-ci.org/powerjg/gem5-ci-test).
We could probably hook this up to our gem5 github page, if it works
out.
Another important point, though, is that we can't expect all
committers to own multiple machines to test their changes on. We
need something that will do pre-commit builds on all the platforms
we claim to support.
We're in the middle of moving the regression tests to a hosted
jenkins instance. Hopefully this will solve some of these issues
(though I don't think it will support multiple OS builds).
Do others have any ideas on a long-term solution here?
Cheers,
Jason
On Tue, Jan 24, 2017 at 5:46 PM Bjoern A. Zeeb <
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-
b
uild
Post by Jason Lowe-Power
-arm-gem5-opt
.
Post by Jason Lowe-Power
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not,
please reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for
NetBSD as well? There are at least 3 different checks for that
code; if people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
Post by Jason Lowe-Power
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize); #else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store or
copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
gem5-dev mailing list
gem5-***@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev
Matthias Jung
2017-02-01 21:41:04 UTC
Permalink
Hi Bjoern,

on my MAC I run into the same issue:
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt


When I use your patch I run into some other errors:

In file included from build/ARM/arch/arm/linux/process.cc:56:
build/ARM/sim/syscall_emul.hh:545:41: error: no member named 'f_namemax' in 'statfs'
tgt->f_namelen = TheISA::htog(host->f_namemax);
~~~~ ^
build/ARM/sim/syscall_emul.hh:551:34: error: no member named 'f_spare' in 'statfs'
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
~~~~ ^
build/ARM/sim/syscall_emul.hh:551:56: error: no member named 'f_spare' in 'statfs'
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
~~~~ ^
3 errors generated.
scons: *** [build/ARM/arch/arm/linux/process.o] Error 1
scons: building terminated because of errors.


If I can help somehow to fix it and get gem5 running on OSX again please let me know.


Regards
Matthias
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt.
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD as well? There are at least 3 different checks for that code; if people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
Bjoern A. Zeeb
2017-02-02 16:31:36 UTC
Permalink
On 1 Feb 2017, at 21:41, Matthias Jung wrote:

Moin,
Post by Jason Lowe-Power
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt
build/ARM/sim/syscall_emul.hh:545:41: error: no member named
'f_namemax' in 'statfs'
tgt->f_namelen = TheISA::htog(host->f_namemax);
~~~~ ^
build/ARM/sim/syscall_emul.hh:551:34: error: no member named 'f_spare' in 'statfs'
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
~~~~ ^
build/ARM/sim/syscall_emul.hh:551:56: error: no member named 'f_spare' in 'statfs'
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
~~~~ ^
3 errors generated.
scons: *** [build/ARM/arch/arm/linux/process.o] Error 1
scons: building terminated because of errors.
If I can help somehow to fix it and get gem5 running on OSX again please let me know.
Grml, then either the man page or the header file lied to me or I looked
in the wrong place. I’ll go and see and update the patch.
Post by Jason Lowe-Power
Am 25.01.2017 um 00:46 schrieb Bjoern A. Zeeb
Post by Jason Lowe-Power
Hi Brandon,
http://qa.gem5.org//1905/compiling-problem-gem5-mac-os-10-11-6-scons-build-arm-gem5-opt.
I think there are a few more places that need an #ifdef NO_STATFS. Could
you look into it and post a patch if there's a problem? If not, please
reply to the gem5 QA post and let them know.
Can people try this one and probably get the #ifdefs right for NetBSD
as well? There are at least 3 different checks for that code; if
people don’t care about “style” I could get it right, but ..
diff -r e47703369039 src/sim/syscall_emul.hh
--- a/src/sim/syscall_emul.hh Fri Jan 20 14:12:58 2017 -0500
+++ b/src/sim/syscall_emul.hh Tue Jan 24 23:45:04 2017 +0000
@@ -70,6 +70,8 @@
#include <sys/stat.h>
#if (NO_STATFS == 0)
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
#endif
#include <sys/time.h>
#include <sys/uio.h>
@@ -530,20 +532,25 @@
{
TypedBufferArg<typename OS::tgt_statfs> tgt(addr);
+ tgt->f_type = TheISA::htog(host->f_type);
#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
- tgt->f_type = 0;
+ tgt->f_bsize = TheISA::htog(host->f_iosize);
#else
- tgt->f_type = TheISA::htog(host->f_type);
+ tgt->f_bsize = TheISA::htog(host->f_bsize);
#endif
- tgt->f_bsize = TheISA::htog(host->f_bsize);
tgt->f_blocks = TheISA::htog(host->f_blocks);
tgt->f_bfree = TheISA::htog(host->f_bfree);
tgt->f_bavail = TheISA::htog(host->f_bavail);
tgt->f_files = TheISA::htog(host->f_files);
tgt->f_ffree = TheISA::htog(host->f_ffree);
memcpy(&tgt->f_fsid, &host->f_fsid, sizeof(host->f_fsid));
+#if defined(__OpenBSD__) || defined(__APPLE__) ||
defined(__FreeBSD__)
+ tgt->f_namelen = TheISA::htog(host->f_namemax);
+ tgt->f_frsize = TheISA::htog(host->f_bsize);
+#else
tgt->f_namelen = TheISA::htog(host->f_namelen);
tgt->f_frsize = TheISA::htog(host->f_frsize);
+#endif
memcpy(&tgt->f_spare, &host->f_spare, sizeof(host->f_spare));
tgt.copyOut(mem);
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
http://m5sim.org/mailman/listinfo/gem5-dev
Bjoern A. Zeeb
2017-02-03 16:25:34 UTC
Permalink
On 2 Feb 2017, at 16:31, Bjoern A. Zeeb wrote:

Hi,

OK, I updated the diff. Can everyone please check if the diff from
http://reviews.gem5.org/r/3803/ works for you now?


/bz

Loading...