Bug: sonar-scanner libseam glibc error (clock_gettime not defined)

Version information:

[2021-08-10T14:23:10.324Z] INFO: SonarQube Scanner 4.2.0.1873
[2021-08-10T14:23:10.324Z] INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
[2021-08-10T14:23:10.324Z] INFO: Linux 5.4.0-1024-aws amd64

Invocation for sonar scanner:

[2021-08-10T14:23:10.026Z] + /home/jenkins/.sonar/sonar-scanner-4.2.0.1873-linux/bin/sonar-scanner -Dsonar.login=**** -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=swift-nav -Dsonar.projectName=starling -Dsonar.projectKey=swift-nav_starling -Dsonar.branch.name=master -Dsonar.coverageReportPaths=./build/code_coverage.xml -Dsonar.cfamily.compile-commands=./build/compile_commands.json -Dsonar.cfamily.threads=8 -Dsonar.cfamily.cache.enabled=false

We’re seeing an error when running sonar-scanner:

[2021-08-10T14:24:26.420Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:26.420Z] INFO: Requesting reproducer for: /home/jenkins/workspace/swift-nav_starling_master_2/pvt_engine/src/ambiguity_lambda_solver.cc
[2021-08-10T14:24:26.677Z] INFO: [pool-3-thread-3] /home/jenkins/workspace/swift-nav_starling_master_2/pvt_engine/src/apriori_model_beidou_elevation_dependent_bias.cc
[2021-08-10T14:24:30.152Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:32.174Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:32.778Z] INFO: [pool-3-thread-3] /home/jenkins/workspace/swift-nav_starling_master_2/pvt_engine/src/apriori_model_cn0_mask.cc
[2021-08-10T14:24:34.227Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

Larger log context (elided some source file names):

[2021-08-10T14:23:10.324Z] INFO: Scanner configuration file: /home/jenkins/.sonar/sonar-scanner-4.2.0.1873-linux/conf/sonar-scanner.properties
[2021-08-10T14:23:10.324Z] INFO: Project root configuration file: /home/jenkins/workspace/swift-nav_starling_master_2/sonar-project.properties
[2021-08-10T14:23:10.324Z] INFO: SonarQube Scanner 4.2.0.1873
[2021-08-10T14:23:10.324Z] INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
[2021-08-10T14:23:10.324Z] INFO: Linux 5.4.0-1024-aws amd64
[2021-08-10T14:23:10.579Z] INFO: User cache: /home/jenkins/.sonar/cache
[2021-08-10T14:23:14.952Z] INFO: SonarQube server 8.9.1
[2021-08-10T14:23:14.953Z] INFO: Default locale: "en_US", source code encoding: "UTF-8"
[2021-08-10T14:23:14.953Z] INFO: Load global settings
[2021-08-10T14:23:15.921Z] INFO: Load global settings (done) | time=816ms
[2021-08-10T14:23:15.921Z] INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
[2021-08-10T14:23:15.921Z] INFO: User cache: /home/jenkins/.sonar/cache
[2021-08-10T14:23:15.921Z] INFO: Load/download plugins
[2021-08-10T14:23:15.921Z] INFO: Load plugins index
[2021-08-10T14:23:15.921Z] INFO: Load plugins index (done) | time=189ms
[2021-08-10T14:23:55.126Z] INFO: Load/download plugins (done) | time=34835ms
[2021-08-10T14:23:55.126Z] INFO: Loaded core extensions: developer-scanner
[2021-08-10T14:23:55.126Z] INFO: Found an active CI vendor: 'Jenkins'
[2021-08-10T14:23:55.126Z] INFO: Load project settings for component key: 'swift-nav_starling'
[2021-08-10T14:23:55.126Z] INFO: Load project settings for component key: 'swift-nav_starling' (done) | time=169ms
[2021-08-10T14:23:55.126Z] INFO: Process project properties
[2021-08-10T14:23:55.126Z] INFO: Execute project builders
[2021-08-10T14:23:55.126Z] INFO: Execute project builders (done) | time=1ms
[2021-08-10T14:23:55.126Z] INFO: Project key: swift-nav_starling
[2021-08-10T14:23:55.126Z] INFO: Base dir: /home/jenkins/workspace/swift-nav_starling_master_2
[2021-08-10T14:23:55.126Z] INFO: Working dir: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork
[2021-08-10T14:23:55.126Z] INFO: Load project branches
[2021-08-10T14:23:55.126Z] INFO: Load project branches (done) | time=163ms
[2021-08-10T14:23:55.126Z] INFO: Check ALM binding of project 'swift-nav_starling'
[2021-08-10T14:23:55.126Z] INFO: Detected project binding: BOUND
[2021-08-10T14:23:55.126Z] INFO: Check ALM binding of project 'swift-nav_starling' (done) | time=157ms
[2021-08-10T14:23:55.126Z] INFO: Load project pull requests
[2021-08-10T14:23:55.126Z] INFO: Load project pull requests (done) | time=208ms
[2021-08-10T14:23:55.126Z] INFO: Load branch configuration
[2021-08-10T14:23:55.126Z] INFO: Load branch configuration (done) | time=1ms
[2021-08-10T14:23:55.126Z] INFO: Load quality profiles
[2021-08-10T14:23:55.126Z] INFO: Load quality profiles (done) | time=220ms
[2021-08-10T14:23:55.126Z] INFO: Load active rules
[2021-08-10T14:23:57.764Z] INFO: Load active rules (done) | time=5119ms
[2021-08-10T14:23:57.764Z] INFO: Organization key: swift-nav
[2021-08-10T14:23:57.764Z] INFO: Branch name: master, type: long-lived
[2021-08-10T14:23:57.764Z] INFO: Indexing files...
[2021-08-10T14:23:57.764Z] INFO: Project configuration:
[2021-08-10T14:23:58.019Z] WARN: File '/home/jenkins/workspace/swift-nav_starling_master_2/pvt_runner/src/config_converter.h' is ignored. It is a symbolic link targeting a file not located in project basedir.
[2021-08-10T14:23:58.317Z] INFO: 1220 files indexed
[2021-08-10T14:23:58.317Z] INFO: 139 files ignored because of scm ignore settings
[2021-08-10T14:23:58.317Z] INFO: Quality profile for c: Sonar way
[2021-08-10T14:23:58.317Z] INFO: Quality profile for cpp: Sonar way
[2021-08-10T14:23:58.317Z] INFO: Quality profile for py: Sonar way
[2021-08-10T14:23:58.317Z] INFO: Quality profile for yaml: Sonar way
[2021-08-10T14:23:58.317Z] INFO: ------------- Run sensors on module starling
[2021-08-10T14:23:58.317Z] INFO: Load metrics repository
[2021-08-10T14:23:58.616Z] INFO: Load metrics repository (done) | time=159ms
[2021-08-10T14:24:00.111Z] INFO: Sensor CSS Rules [cssfamily]
[2021-08-10T14:24:00.111Z] INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[2021-08-10T14:24:00.111Z] INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
[2021-08-10T14:24:00.111Z] INFO: Sensor IaC CloudFormation Sensor [iac]
[2021-08-10T14:24:00.111Z] INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=0ms
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Project Type Information [csharp]
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Project Type Information [csharp] (done) | time=2ms
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Analysis Log [csharp]
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Analysis Log [csharp] (done) | time=11ms
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Properties [csharp]
[2021-08-10T14:24:00.111Z] INFO: Sensor C# Properties [csharp] (done) | time=1ms
[2021-08-10T14:24:00.111Z] INFO: Sensor JavaXmlSensor [java]
[2021-08-10T14:24:00.111Z] INFO: Sensor JavaXmlSensor [java] (done) | time=6ms
[2021-08-10T14:24:00.111Z] INFO: Sensor HTML [web]
[2021-08-10T14:24:00.111Z] INFO: Sensor HTML [web] (done) | time=4ms
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Project Type Information [vbnet]
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Analysis Log [vbnet]
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=11ms
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Properties [vbnet]
[2021-08-10T14:24:00.111Z] INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
[2021-08-10T14:24:00.111Z] INFO: Sensor Python Sensor [python]
[2021-08-10T14:24:00.111Z] WARN: Your code is analyzed as compatible with python 2 and 3 by default. This will prevent the detection of issues specific to python 2 or python 3. You can get a more precise analysis by setting a python version in your configuration via the parameter "sonar.python.version"
[2021-08-10T14:24:00.111Z] INFO: Starting global symbols computation
[2021-08-10T14:24:00.111Z] INFO: 32 source files to be analyzed
[2021-08-10T14:24:00.111Z] INFO: Load project repositories
[2021-08-10T14:24:00.409Z] INFO: Load project repositories (done) | time=479ms
[2021-08-10T14:24:02.465Z] INFO: 32/32 source files have been analyzed
[2021-08-10T14:24:02.465Z] INFO: Starting rules execution
[2021-08-10T14:24:02.465Z] INFO: 32 source files to be analyzed
[2021-08-10T14:24:04.480Z] INFO: 32/32 source files have been analyzed
[2021-08-10T14:24:04.480Z] INFO: Starting test sources highlighting
[2021-08-10T14:24:04.480Z] INFO: 20 source files to be analyzed
[2021-08-10T14:24:05.085Z] INFO: 20/20 source files have been analyzed
[2021-08-10T14:24:05.085Z] INFO: Sensor Python Sensor [python] (done) | time=4995ms
[2021-08-10T14:24:05.085Z] INFO: Sensor Cobertura Sensor for Python coverage [python]
[2021-08-10T14:24:05.384Z] INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=472ms
[2021-08-10T14:24:05.384Z] INFO: Sensor PythonXUnitSensor [python]
[2021-08-10T14:24:05.989Z] INFO: Sensor PythonXUnitSensor [python] (done) | time=345ms
[2021-08-10T14:24:05.989Z] INFO: Sensor JaCoCo XML Report Importer [jacoco]
[2021-08-10T14:24:05.989Z] INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
[2021-08-10T14:24:05.989Z] INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
[2021-08-10T14:24:05.989Z] INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
[2021-08-10T14:24:05.989Z] INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
[2021-08-10T14:24:05.989Z] INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=2ms
[2021-08-10T14:24:05.989Z] INFO: Sensor Python HTML templates processing [securitypythonfrontend]
[2021-08-10T14:24:05.989Z] INFO: HTML files are not indexed : you may want to add them in the scanned files of this project to detect Python XSS vulnerabilities
[2021-08-10T14:24:05.989Z] INFO: Sensor Python HTML templates processing [securitypythonfrontend] (done) | time=91ms
[2021-08-10T14:24:05.989Z] INFO: Sensor Serverless configuration file sensor [securityjsfrontend]
[2021-08-10T14:24:05.989Z] INFO: 0 Serverless function entries were found in the project
[2021-08-10T14:24:05.989Z] INFO: 0 Serverless function handlers were kept as entrypoints
[2021-08-10T14:24:05.989Z] INFO: Sensor Serverless configuration file sensor [securityjsfrontend] (done) | time=56ms
[2021-08-10T14:24:05.989Z] INFO: Sensor AWS SAM template file sensor [securityjsfrontend]
[2021-08-10T14:24:06.287Z] WARN: Invalid character encountered in file /home/jenkins/workspace/swift-nav_starling_master_2/integration/test/unit/invalid_configs/garbage.yaml at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
[2021-08-10T14:24:06.287Z] INFO: Sensor AWS SAM template file sensor [securityjsfrontend] (done) | time=282ms
[2021-08-10T14:24:06.287Z] INFO: Sensor Generic Coverage Report
[2021-08-10T14:24:06.287Z] INFO: Parsing /home/jenkins/workspace/swift-nav_starling_master_2/build/code_coverage.xml
[2021-08-10T14:24:08.926Z] INFO: Imported coverage data for 617 files
[2021-08-10T14:24:08.926Z] INFO: Coverage data ignored for 962 unknown files, including:
[..]
[2021-08-10T14:24:08.926Z] INFO: Sensor Generic Coverage Report (done) | time=2303ms
[2021-08-10T14:24:08.926Z] INFO: Sensor CFamily [cpp]
[2021-08-10T14:24:08.926Z] INFO: CFamily plugin version: 6.24.0.35414
[2021-08-10T14:24:08.926Z] INFO: Using compile commands: /home/jenkins/workspace/swift-nav_starling_master_2/./build/compile_commands.json
[2021-08-10T14:24:08.926Z] INFO: Available processors: 8
[2021-08-10T14:24:08.926Z] INFO: Using 8 threads for analysis according to value of "sonar.cfamily.threads" property.
[2021-08-10T14:24:17.297Z] INFO: Cache is explicitly disabled: Optional[false]
[..]
[2021-08-10T14:24:26.420Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:26.420Z] INFO: Requesting reproducer for: /.../...er.cc
[2021-08-10T14:24:26.677Z] INFO: [pool-3-thread-3] /.../...as.cc
[2021-08-10T14:24:30.152Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:32.174Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
[2021-08-10T14:24:32.778Z] INFO: [pool-3-thread-3] /.../...k.cc
[2021-08-10T14:24:34.227Z] /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/subprocess: relocation error: /home/jenkins/workspace/swift-nav_starling_master_2/.scannerwork/.sonartmp/14313237441130746525/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

This results exceptions such as:

[2021-08-10T14:24:45.999Z] ERROR: Exception in thread pool-3-thread-2
[2021-08-10T14:24:45.999Z] com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /.../...ce.cc
[2021-08-10T14:24:45.999Z] 	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:132)
[2021-08-10T14:24:45.999Z] 	at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:52)
[2021-08-10T14:24:45.999Z] 	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$12(CFamilySensor.java:718)
[2021-08-10T14:24:45.999Z] 	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
[2021-08-10T14:24:45.999Z] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[2021-08-10T14:24:45.999Z] 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
[2021-08-10T14:24:45.999Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[2021-08-10T14:24:45.999Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[2021-08-10T14:24:45.999Z] 	at java.base/java.lang.Thread.run(Unknown Source)

Then eventually:

[2021-08-10T14:24:58.792Z] INFO: ------------------------------------------------------------------------
[2021-08-10T14:24:58.792Z] INFO: EXECUTION FAILURE
[2021-08-10T14:24:58.792Z] INFO: ------------------------------------------------------------------------
[2021-08-10T14:24:58.792Z] INFO: Total time: 1:48.441s
[2021-08-10T14:24:58.792Z] INFO: Final Memory: 172M/584M
[2021-08-10T14:24:58.792Z] INFO: ------------------------------------------------------------------------
[2021-08-10T14:24:58.792Z] ERROR: Error during SonarQube Scanner execution
[2021-08-10T14:24:58.792Z] java.lang.IllegalStateException: 
[2021-08-10T14:24:58.792Z] An error occurred while analyzing the following compilation unit: 
[2021-08-10T14:24:58.792Z]   /.../...er.cc
[2021-08-10T14:24:58.792Z] A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
[2021-08-10T14:24:58.792Z] Please contact SonarSource support providing the following file to help improving the analyzer:
[2021-08-10T14:24:58.793Z]   /.../sonar-cfamily-reproducer.zip
[2021-08-10T14:24:58.793Z] 
[2021-08-10T14:24:58.793Z] 	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:427)
[2021-08-10T14:24:58.793Z] 	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:177)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:45)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:445)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:441)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:399)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2021-08-10T14:24:58.793Z] 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2021-08-10T14:24:58.793Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2021-08-10T14:24:58.793Z] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
[2021-08-10T14:24:58.793Z] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[2021-08-10T14:24:58.793Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-08-10T14:24:58.793Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[2021-08-10T14:24:58.793Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2021-08-10T14:24:58.793Z] 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[2021-08-10T14:24:58.793Z] 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
[2021-08-10T14:24:58.793Z] 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Running into this same issue on docker in Azure Devops.

2021-08-10T18:22:30.6355666Z INFO: SonarScanner 4.6.0.2311
2021-08-10T18:22:30.6356631Z INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
2021-08-10T18:22:30.6357100Z INFO: Linux 5.8.0-1039-azure amd64
2021-08-10T18:23:44.2791671Z /__w/1/s/.scannerwork/.sonartmp/18307609006397033493/subprocess: relocation error: /__w/1/s/.scannerwork/.sonartmp/18307609006397033493/libseam.so: symbol clock_gettime, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

docker image hasn’t changed, Microsoft Hosted Image might have (ubuntu-latest):

Attempted to upgrade sonar-scanner to ‘4.6.2.2472’, but that didn’t make a difference.

I tried updating to 4.6.2.2472 too with the same result, it seems libseam.so is something that’s downloaded during execution and it’s not properly linked. The clock_gettime function requires the library to be linked with librt.so.

I ran into the same issue using bitbucket pipelines and docker. I am using SONAR_SCANNER_VERSION=4.2.0.1873. Unfortunately I cannot provide a solution yet.

1 Like

I adapted our pipeline to upload the sonar-cfamily-reproducer.zip as artifact.
I’d rather not share this on a public forum though. If this file might be helpful to resolve the issue, please allow me to share it privately.

I am also experiencing the same issue on Bitbucket Cloud with sonarsource. Tried changing the sonar scanner with no luck.

https://community.sonarsource.com/t/sonarcloud-cfamily-relocation-error/47921/3?u=hugo_serrat

Thank you all for your report, we created a ticket on our side CPP-3238, we are going to investigate it on our side, I am going to come back to you with more requests if needed.

2 Likes

@mpaladin any news on this ? All our CI are failing and we are not able to release new updates.

Sorry to push but we rely on the CI to release software.

1 Like

CFamily plugin is going to be reverted on SonarCloud by the end of the day, see the incident report: SonarCloud Status - Some customers cannot start the Analysis Computation on the C-family languages.

2 Likes

I can confirm that this is fixed for us now, a few follow-up questions:

  • Why is there a component that’s downloaded and executed (whatever it is that ends up trying to load libseam.so), ideally I’d like the tool to not download any executable code so that I can control what’s running in my CI.
  • Is there a way to prevent or mitigate this in the future? If there was a way to modify the plugin then there are a number of workaround that can be implemented.

Hi @silverjam ,

when you launch sonar-scanner it fetches the language analyzers from the SonarQube/SonarCloud server and it executes them, sonar-scanner is independent of the server it is running against.

We do our best to prevent that, unfortunately, we didn’t catch this linking issue during our development/validation phase, we are going to certainly not reintroduce it in the future. This bug affects only part of the users running an analysis on some linux flavors, depending on clock_gettime linkage.

1 Like

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