Bug 468639

Summary: Compiling 8.0.0 stop on 'make install'.
Product: [Applications] digikam Reporter: Bob Billson <reb>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version First Reported In: 8.0.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:

Description Bob Billson 2023-04-18 05:05:00 UTC
SUMMARY
***
Compiling 8.0.0 from source doing 'sudo make install' crashes with error complaining test-data directory already exists and is not empty.
***

STEPS TO REPRODUCE
1. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr/local .
2. make -j`nproc`
3. sudo make install

OBSERVED RESULT

reb@grue:~/src/digikam/digikam-8.0.0$ sudo make install
[sudo] password for reb:
[  0%] Generating mo...
[  0%] Built target pofiles-651a6d3373c8feb286ebdb52b95b3370
[  0%] Generating ts...
[  0%] Built target tsfiles-651a6d3373c8feb286ebdb52b95b3370
make[2]: Circular CMakeFiles/test-data <- test-data dependency dropped.
make[2]: Circular test-data <- test-data dependency dropped.
[  0%] Checkout unit-test data repository. Please wait...
fatal: destination path '/home/reb/src/digikam/digikam-8.0.0/test-data' already exists and is not an empty directory.
make[2]: *** [CMakeFiles/test-data.dir/build.make:73: test-data] Error 128
make[1]: *** [CMakeFiles/Makefile2:7123: CMakeFiles/test-data.dir/all] Error 2
make: *** [Makefile:146: all] Error 2


SOFTWARE/OS VERSIONS

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.2.11-grue (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-6500U CPU @ 2.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: Purism
Product Name: Librem 15 v3
System Version: 1.0
Comment 1 caulier.gilles 2023-04-18 07:52:06 UTC
her i use "make install/fast" and it works...
Comment 2 Bob Billson 2023-04-19 01:06:15 UTC
(In reply to caulier.gilles from comment #1)
> her i use "make install/fast" and it works...

"make install/fast" also worked for me
Comment 3 caulier.gilles 2023-04-19 04:44:00 UTC
I just tried here with current code from git master (next 8.1.0), and problem is not reproducible. "sudo make install" work as expected, i'm use Kubuntu 22.04.

Tip : clean your "build" directory, recompile all and try again.

Gilles Caulier
Comment 4 Bob Billson 2023-04-21 23:58:27 UTC
(In reply to caulier.gilles from comment #3)
> I just tried here with current code from git master (next 8.1.0), and
> problem is not reproducible. "sudo make install" work as expected, i'm use
> Kubuntu 22.04.
> 
> Tip : clean your "build" directory, recompile all and try again.
> 
> Gilles Caulier

I cleaned my "build" directory and recompiled. Same error with "sudo make install".
Comment 5 caulier.gilles 2023-04-22 02:41:21 UTC
In fact it breaks in unit-test rules. I don't know why. You don't needs unit-test in your build. Just disable it to append this configure option with cmake:

-DBUILD_TESTING=OFF

recompile all after configure and try make install.

Gilles Caulier
Comment 6 Bob Billson 2023-05-02 00:30:25 UTC
(In reply to caulier.gilles from comment #5)
> In fact it breaks in unit-test rules. I don't know why. You don't needs
> unit-test in your build. Just disable it to append this configure option
> with cmake:
> 
> -DBUILD_TESTING=OFF
> 
> recompile all after configure and try make install.

After a clean recompile, make install work without any errors.