Hi Scott, Hard to diagnose without more information. Can you build with verbose logging, so we can see what ninja is waiting on? Does "ps" or "pstree" show any children which have become stuck? Does it happen if you build with no parallelisation?
It's possible there is a broken rule being emitted. It's not been picked up by the CI though. Also possible you've encountered a ninja bug--I've seen them in the past though I would think it unlikely. Or possibly a bug in the CMake version you are using if it's generating a broken rule. If you can identify where it's getting stuck, it might be worth looking through the generated Ninja file to see if there is any obviously broken rule in there. Also worth running ninja under strace so you can follow what's going on. If you trace all threads and child processes, that might give you an indication about what it's waiting on. Kind regards, Roger > -----Original Message----- > From: Scott Furry <scott.wl.fu...@gmail.com> > Sent: 16 October 2022 16:25 > To: c-users@xalan.apache.org > Subject: Testing hangs with Ninja build method > > Platform: AMD Bulldozer (yes, that old) > OS: Gentoo X86_64 > gcc: 11.3.0 (Gentoo 11.3.0-p4) > clang: 13.0.1 > Xerces-C: v3.2.3 > Xalan-C: v1.12.0 > > Xerces-C was installed via Gentoo ebuild. No errors or warnings were > encountered during install. > Xalan-C was cloned from github repository. Followed steps for a Ninja build. > A few odd warnings were encountered during the process(i.e. > -Wdeprecated-copy, -Wextra, etc). No errors reported during build. > > commands: > $ cd [cloned repo] > $ cmake -H. -Bbuild -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/Xalan-C > -DCMAKE_BUILD_TYPE=Release > ... > -- Xalan-C++ configuration summary > -- ------------------------------- > -- > -- Version: 1.12.0 > -- Library major version: 112 > -- Library minor version: 0 > -- > -- Installation directory: /usr/local/Xalan-C > -- C compiler: /usr/bin/cc > -- C++ compiler: /usr/bin/c++ > -- > -- Build shared libraries: ON > -- Thread implementation: standard > -- Transcoder: icu > -- Message Loader: inmemory > -- Message Loader Locale: en_US > -- Configuring done > -- Generating done > -- Build files have been written to: /home/[path]/[cloned repo]/build $ ninja > - > C build > > When executing testing ($ cd build; ctest -V -j8;), test #21 will hang > indefinitely with no timeout encountered. Numerous `21: Waiting for active > threads to finish...` messages were reported. Last information reported in > the terminal was `21: Waiting for active threads to finish...` message. After > ~15 minutes wating, testing process was manually aborted. > > I cleaned and reset the cloned repository to start again. I repeated the above > except using clang/clang++ build. I received the same results with compile. > Testing would still hang indefinitely waiting for active threads. Testing had > to > be manually aborted. > > Cleaning and resetting the cloned repository, above steps were repeated > using `... -G "Unix Makefiles" ...` in the CMake command instead. > Configure and build successfully completed similar to above. > > Unlike the above results, testing with command `make -C build test` > command ran to successful completion and exited correctly. I repeated > testing with ctest on the build. Again, testing completed and exited > successfully. > > I suspect there is some deviation between the makefile and ninja build setup. > A ninja setup, utilizing either gcc or clang, results in testing to hang > indefinitely. > > Please advise if there is some other step should be taken to diagnose.