ACLiC broken in v5-34-00-patches

@pcanal Commits applied on Sep 20, 2021, completely broke ACLiC (the linker step cannot find ROOT’s libraries). Please revert to the version from Jan 25, 2021.

This is Ubuntu 20.04 LTS / x86_64 / gcc 9.3.0 here, ROOT built with its default c++ standard:

[...]$ root trial.cxx++
root [0] 
Processing trial.cxx++...
Info in <TUnixSystem::ACLiC>: creating shared library /..././trial_cxx.so
/usr/bin/ld: /.../trial_cxx_ACLiC_dict.o: in function `trial()':
/..././trial.cxx:4: undefined reference to `TH1D::TH1D(char const*, char const*, int, double, double)'
collect2: error: ld returned 1 exit status
Error in <ACLiC>: Compilation failed!
Error: Function trial() is not defined in current scope  :0:
*** Interpreter error recovered ***
root [1] .q

annoyingly, I can not reproduce this problem :frowning:

I used:

$ cat trial.cxx                    
#include "TH1.h"                                       
                                                       
void func() {                                          
  TH1 *h = new TH1D("h", "", 100,0, 100);              
} 

and get:

pcanal@Viroflay:/var/tmp$ ~/root_working/build/v5-34-00-patches/bin/root -b
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.34/39     12 March 2018   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.34/39 (heads/v5-34-00-patches@v5-34-38-1-g507abd2, Sep 10 2021, 15:19:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .L trial.cxx+
Info in <TUnixSystem::ACLiC>: creating shared library /var/tmp/./trial_cxx.so
Warning in <ACLiC>: Failed to generate the dependency file for /var/tmp/./trial_cxx.so

What am I missing?

That seems to just be a fluke of the build system (lack of regen). I rebuild from scratch with the same “works for me” result. In the meantime, I am also building from scratch on a ubuntu 20.04 machine.

where the problem appears …

in my case calling bin/thisroot.sh “seems” to make the problem go away.

never mind this was a stale build …

I believe I fixed the problem (by fixing the code). Can you verify?

Thanks. The new commit on Nov 6, 2021, seems to solve the problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.