Skip to content

Wip wjw freebsd compile#7515

Closed
wjwithagen wants to merge 22 commits intoceph:masterfrom
wjwithagen:wip-wjw-freebsd-compile
Closed

Wip wjw freebsd compile#7515
wjwithagen wants to merge 22 commits intoceph:masterfrom
wjwithagen:wip-wjw-freebsd-compile

Conversation

@wjwithagen
Copy link
Contributor

Enough changes to get ceph to compile on FreeBSD.

On FreeBSD the code now halts after testing runc-cli-tests
The next step will be to get the tests running....

// documentation.
#warning Falling back to CLOCK_REALTIME, may be slow.
clock_gettime(CLOCK_REALTIME, &ts);
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjwithagen FYI, #7466 by @adamemerson also addresses this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 4-2-2016 17:15, Kefu Chai wrote:

In src/common/ceph_time.cc
#7515 (comment):

@@ -49,7 +49,18 @@ namespace ceph {
coarse_real_clock::time_point coarse_real_clock::now(
const CephContext* cct) noexcept {
struct timespec ts;

  •  clock_gettime(CLOCK_REALTIME_COARSE, &ts);
    
    +#if defined(CLOCK_REALTIME_COARSE)
  •    // Linux systems have _COARSE clocks.
    
  •    clock_gettime(CLOCK_REALTIME_COARSE, &ts);
    
    +#elif defined(CLOCK_REALTIME_FAST)
  •    // BSD systems have _FAST clocks.
    
  •    clock_gettime(CLOCK_REALTIME_FAST, &ts);
    
    +#else
  •    // And if we find neither, you may wish to consult your system's
    
  •    // documentation.
    
    +#warning Falling back to CLOCK_REALTIME, may be slow.
  •    clock_gettime(CLOCK_REALTIME, &ts);
    
    +#endif

@wjwithagen https://github.com/wjwithagen FYI, #7466
#7466 by @adamemerson
https://github.com/adamemerson also addresses this issue.

I know, but I "need" it to actually make any progress in getting things
compiling....
If there is an other way of doing this, just let me know...

This is a thing to consider anyways since quite a few people are
creating fixes for FreeBSD compiling. And several of the outstanding
pulls are conflicting and/or fixing the smae problem

And I'm not sure on how this will be handled when importing any of the
pulls. I sort of expect to rebase and fix merges once any of the
FreeBSD/Darwin/other pulls gets accepted.

--WjW

@wjwithagen
Copy link
Contributor Author

@liewegas
I've thought a little bit more about it, and For the time being I'll require that FreeBSD build needs a softlinked /bin/bash to actually get things done.
And comment as such in a README.FreeBSD.
Just as a side note: I ran the script thru /usr/local/bin/dash on FreeBSD, and that just worked fine.

@wjwithagen
Copy link
Contributor Author

'mmm

FAIL: test/mon/mon-created-time.sh

../test-driver: line 95: ./test/mon/mon-created-time.sh: Permission denied

Lets see if a rebase will help

@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch from 64342dc to fd23298 Compare February 5, 2016 15:13
@tchaikov
Copy link
Contributor

tchaikov commented Feb 5, 2016

mon-created-time.sh: Permission denied

it's fixed just now.

@wjwithagen
Copy link
Contributor Author

@tchaikov
Thanx, that is going to clash with the chmod I just made in my tree.
But it'll work out.

@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch 2 times, most recently from 6e8b98b to c2c5aad Compare February 5, 2016 20:55
@wjwithagen
Copy link
Contributor Author

@tchaikov
I do not really understand why this errors
https://jenkins.ceph.com/job/ceph-pull-requests/1156/console

As far as I can tell, I'm up with HEAD. So that should not be the cause.

@tchaikov
Copy link
Contributor

tchaikov commented Feb 6, 2016

@wjwithagen this error does look suspicious.

@dachary i guess it might be a bug. i posted a pull request to address it at #7549.

@wjwithagen
Copy link
Contributor Author

@tchaikov @dachary
I have not worked on any of the python files, and I try to keep my changes from actually modifying anything that changes the code for the Linux versions

@wjwithagen
Copy link
Contributor Author

@tchaikov
I guess a rebase is in order.

@tchaikov
Copy link
Contributor

tchaikov commented Feb 8, 2016

@wjwithagen sorry for the confusion, i meant it was very likely a bug. and there are two other issues in testing got fixed recently. you might want to rebase against master to pick up them.

BTW, you might need to drop 82cda01 from your pull request.

@wjwithagen
Copy link
Contributor Author

@tchaikov
Before I mess up my tree again:
How do I "drop" your commit 82cda01??
I could revert, but that will give a commit message

@wjwithagen
Copy link
Contributor Author

@tchaikov
For FreeBSD boost again seems to work. Thanx.

@liewegas
Copy link
Member

liewegas commented Feb 8, 2016

git rebase -i 82cda01^
and then delete the first line (the one with that commit)

On Mon, 8 Feb 2016, Willem Jan Withagen wrote:

@tchaikov
Before I mess up my tree again:
How do I "drop" your commit 82cda01??
I could revert, but that will give a commit message


Reply to this email directly or view it on GitHub.[AAabh4peTIQJsjucdntKb6HlaUHdgxfGks5piIctgaJpZM4HS7vv.gif]

@wjwithagen
Copy link
Contributor Author

Some more errors which I cannot place:
PASS: test/mon/osd-pool-create.sh
PASS: test/mon/mon-ping.sh
PASS: test/mon/mon-created-time.sh
/tmp/hudson8518538414639280563.sh: line 2: 2508 Killed timeout 7200 ./run-make-check.sh
Build step 'Execute shell' marked build as failure

I guess that a watchdog kills things after 2 hours of running?
But I have no idea where the script actually gets stuck

I see that the script will not run on FreeBSD due to missing RBD, but I have not yet come to that.

@liewegas
Copy link
Member

liewegas commented Feb 8, 2016

make check -j1 and ps xf might help narrow down which test gets hung...

On Mon, 8 Feb 2016, Willem Jan Withagen wrote:

Some more errors which I can place:
PASS: test/mon/osd-pool-create.sh
PASS: test/mon/mon-ping.sh
PASS: test/mon/mon-created-time.sh
/tmp/hudson8518538414639280563.sh: line 2: 2508 Killed timeout 7200 ./run-make-check.sh
Build step 'Execute shell' marked build as failure

I guess that a watchdog kills things after 2 hours of running?
But I have no idea where the script actually gets stuck

I see that the script will not run on FreeBSD due to missing RBD, but I have not yet come to that.


Reply to this email directly or view it on GitHub.[AAabhwyZlhI0s6g5WjE5b08HIApgG04oks5piJvEgaJpZM4HS7vv.gif]

@wjwithagen
Copy link
Contributor Author

@liewegas
Eh, right but how do I do that for a Jenkins process.

I would expect ./run-make-check.sh to be the cullpit, but then again I cannot run that here since has RBD.

@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch 4 times, most recently from 52e303b to 382422a Compare February 11, 2016 10:34
@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch 3 times, most recently from 3b31e53 to d91e126 Compare May 22, 2016 20:09
@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch from d91e126 to 53d8781 Compare May 27, 2016 12:14
wjwithagen added 22 commits May 29, 2016 14:00
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
But the code seems to compile even without it.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
We currently do not build Bluestore on FreeBSD due to incompatible AIO

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
…onstexpr

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Clang refuses to promote an address to int64_t by itself

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
As long as FreeBSD has nog RBD device, all tests for RBD will not work.
run-cli-tests needs to be passed before any of the other tests are build/run,
so ATM we exclude the RBD tests and complete with success under FreeBSD

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This is not available under FreeBSD, where the Posix variant -E is.
Rewritten the tests to accept any whitespace type, instead of just TAB

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
…ockets.h>

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
…ndle

MAP_ANONYMOUS
  The  mapping  is not backed by any file; its contents are initialized to zero.
  The fd and offset arguments are ignored; however,  some  implementations
  require  fd  to  be  -1  if MAP_ANONYMOUS  (or  MAP_ANON)  is specified, and
  portable applications should ensure this.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
If certain properties of the disks are essential to test here,
new tests need to be written specific for the FreeBSD situation.
For now tests are run on a ZFS only system.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
 * Could use 'df -T' for that, if really needed.
 * /proc/mounts is only available in linux emulation, and is found in
     /compat/linux
 * Also wrapped some long lines.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
… m are const.

This is a GCC extention that is not available in Clang

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This require mounting the linprocfs system:
  - kldload linprocfs
  - in /etc/fstab:
	linproc         /compat/linux/proc      linprocfs       rw 0 0
    Cannot mount in /proc, since that is taken bij FreeBSD itself

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
FreeBSD does not have PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP defined
So we need to create the mutex ourselves. This is copied from older code
in previous commits.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
stat -c '%T' does not give fstype

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
So do not use a hardcode struct to initialize.
Instead assign all the required fields individually

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
_check_disk_write_cache is #ifdef to be for Linux only.
FreeBSD does not have hdparm tool to check disk setting.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This is hard to test from the program itself, and would need to be tested
from a script/program that actually calls this test.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@wjwithagen wjwithagen force-pushed the wip-wjw-freebsd-compile branch from 53d8781 to 2ab6bf8 Compare May 29, 2016 12:00
@wjwithagen wjwithagen closed this Jul 28, 2016
@wjwithagen wjwithagen deleted the wip-wjw-freebsd-compile branch January 4, 2017 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants