Skip to content

Conversation

@pcanal
Copy link
Member

@pcanal pcanal commented Sep 25, 2017

This is an update of #134 to work compile on MacOS and rename TSigHandling into TSignalManager.

This is a work in progress as the new TSignalManager no longer calls TSystem::StackTrace but is also only implementing support for unix systems.

@zzxuanyuan Could you update the code to support at least MacOS (and attempt to support Windows)?

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, ubuntu14/native with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@phsft-bot
Copy link

@zzxuanyuan
Copy link
Contributor

I will look at it. @pcanal @bbockelm what is the common way to develop software in MacOS? Should I build ROOT on my laptop? or use some virtual machine with MacOS installed?

@amadio
Copy link
Member

amadio commented Oct 3, 2017

@zzxuanyuan You can build on MacOS if you have a full version of XCode installed (command line tools only are not enough). If you have CVMFS, you can get some of the externals from there too. Just let me know and I'll show you how to do it.

@amadio amadio removed their assignment Oct 5, 2017
@bbockelm
Copy link
Contributor

@zzxuanyuan - any updates on getting this to work on OS X?

@etejedor
Copy link
Collaborator

@zzxuanyuan any updates on this PR?

Copy link
Member

@amadio amadio left a comment

Choose a reason for hiding this comment

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

I think this pull request needs to be changed to avoid ifdefs, as there are too many, and to not add something and change it later, but just add the final version directly. Otherwise, it should be squashed upon merging, as the history here is not useful (e.g. adding file with Author: Fons Rademakers 15/09/95 to then change Author... in a later commit, adding Exit(), changing to gSystem->Exit() then removing the added code in later commit, etc).

#pragma link C++ class TSubString;
#pragma link C++ class TSysEvtHandler;
#pragma link C++ class TSigHandling+;
#pragma link C++ class TSignalManager+;
Copy link
Member

Choose a reason for hiding this comment

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

Please amend the original commit instead of adding it with one name and then renaming.

fcntl(fd, F_SETFL, flags);
}
return -ETIMEDOUT;
} else { }
Copy link
Member

Choose a reason for hiding this comment

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

Why have an empty else clause?

if (complete == -1) {
if (errno == EINTR) { continue; }
else if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { continue; }
else {
Copy link
Member

Choose a reason for hiding this comment

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

This is not following coding conventions. Please format new code appropriately before committing.

SignalSafeErrWrite("Unable to pre-allocate executable information");
return;
}
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this #ifdef and use TROOT::GetEtcDir() or equivalent.

syscall(SYS_execve, "/bin/sh", argv, __environ);
#else
execv("/bin/sh", argv);
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Why not use the same for Linux and non-Linux? What's the advantage of this and other similar #ifdefs?
For instance, why not use evecve() from unistd.h? It's a POSIX interface.

SignalSafeErrWrite("(Failed to wait on stack dump output.)\n");
Exit(1, kFALSE);
} else {
Exit(0, kFALSE);
Copy link
Member

Choose a reason for hiding this comment

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

Please just add the final version instead of adding Exit() then changing to gSystem->Exit() in a later commit.

if (-1 == pipe(gStackTraceHelper.fChildToParent))
#else
if (-1 == pipe2(gStackTraceHelper.fChildToParent, O_CLOEXEC))
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Please just use pipe() and remove the #ifdef. This is unnecessary complexity.
https://www.usenix.org/legacy/publications/library/proceedings/sa92/spencer.pdf

ROOT_GLOB_SOURCES(sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx)

set(Unix_dict_headers ${CMAKE_CURRENT_SOURCE_DIR}/inc/T*.h PARENT_SCOPE)
ROOT_GLOB_HEADERS(headers ${CMAKE_CURRENT_SOURCE_DIR}/inc/T*.h)
Copy link
Member

Choose a reason for hiding this comment

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

ROOT_GLOB_HEADERS() is not allowed anymore. Please list all files. This is a pre-requisite to solve ROOT-5998.

@lmoneta
Copy link
Member

lmoneta commented Jan 29, 2019

@pcanal is this PR still relevant ?

@zzxuanyuan
Copy link
Contributor

@pcanal Is there any update on signal handler on MacOS? Do I still need to work on this one?

@hageboeck
Copy link
Member

Converted to draft in order to be able to remove the do not merge label.

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on mac1014/python3.
Running on macphsft17.dyndns.cern.ch:/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T14:58:39.882Z] CMake Error at /build/jenkins/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-4.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:01:06.764Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:05:27.021Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:14:05.523Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:36:49.690Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:37:01.438Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on mac1015/cxx17.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:53:09.394Z] CMake Error at /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

@phsft-bot
Copy link

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-09-14T15:54:30.086Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:982 (message):

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.