ERROR: ld.so: object

scanner
sonarcfamily
sonarqube

(Julinx2) #1

Cuando ejecuta build-wrapper produce el error siguiente.

consola build-wrapper-linux-x86-64 --out-dir bw_output xcodebuild clean build

ERROR: ld.so: object '/home/jazocar/Descargas/build-wrapper-linux-x86/libinterceptor-${PLATFORM}.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
build-wrapper: execvp: No such file or directory

nose porque sale el error
ayuda por favor
Saludos


(Loïc Joly) #2

Hello,

This forum is in English language, we don’t understand Spanish.

From the error message that you display, it looks like there is a problem with your installation of the build wrapper tool. Did you just unzip the full downloaded package into one folder, and tried to execute it from there?


(Julinx2) #3

Hi thanks

excuse the language I’m from Chile

I explain the error below

download in my linux build-wrapper-linux-x86, then unzip it

then add the route to the APP

linux path,

export PATH=/opt/glassfish4/bin:/home/jazocar/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/jazocar/Descargas/sonar-scanner-3.2.0.1227-linux/bin:/home/jazocar/Descargas/build-wrapper-linux-x86

then I went to the folder of the “C” files and run build-wrapper-linux-x86-64 --out-dir bw_output xcodebuild clean build and I get the following error

jazocar@juliopc:~/Descargas/sonar-scanner-3.2.0.1227-linux/bin/cred2$ build-wrapper-linux-x86-64 --out-dir bw_output xcodebuild clean build

ERROR: ld.so: object '/home/jazocar/Descargas/build-wrapper-linux-x86/libinterceptor-${PLATFORM}.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

build-wrapper: execvp: No such file or directory

(Loïc Joly) #4

Hello,

We see two potential issues in your situation:

Running xcodebuild on linux

As far as I know, it’s not possible to run xcodebuildr from a linux machine, you have to be on a Mac. So either you run the build-wrapper on a Mac box, or, if the code is portable, you may run it from Linux, but you will need a command-line that does not involve xcodebuild.

By the way, it you try to run build-wrapper-linux-x86-64 --out-dir bw_output {something} and it does not work, the first step would be to check that running {something} independently works.

Potential issue with libinterceptor

You might be affected by the same issue that was reported in this thread: SonarQube - C++ - Ubuntu - build-wrapper LD_PRELOAD Error

To check if this is the case, you can run the command:

strace -f -E LD_DEBUG=all ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output /bin/echo test >stdout.txt 2>stderr.txt

And search if the resulting output contains libinterceptor-haswell.so . If so, you are in the same situation, and you can work around it by using the same way that was proposed there:

If not, we don’t yet know what happens, and we might be interested in getting the files generated by this strace command to look at them more deeply, as well as the logs from the build wrapper (they will be in the bw_output folder).

Regards,


(Julinx2) #5

create

libinterceptor-haswell.so from libinterceptor-x86_64.so

now it only delivers the following error

build-wrapper: execvp: No such file or directory

I attach the files

Thank you

(Attachment files.zip is missing)


(Julinx2) #6

create

libinterceptor-haswell.so from libinterceptor-x86_64.so

now it only delivers the following error

build-wrapper: execvp: No such file or directory

I attach the files

but stdout.txt is 0 byte not send

credito_fun.txt is my file c

sonar-scanner.txt is properties

sonar-scanner.properties is

sonar.projectKey=cred

sonar.name=cred

sonar.sources=.

sonar.host.url=http://localhost:9000

sonar.login=cf97ff948c9bafc2260a0efbafcdc27b7a1cb292

sonar.cfamily.build-wrapper-output=bw_output

sonar.scm.disabled=true

sonar.language=c

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8

sonar.jdbc.driverClassName=com.mysql.jdbc.Driver

sonar.jdbc.username=sonar

sonar.jdbc.password=sonar

Thank you

stderr.txt (101 Bytes)

credito_fun.txt (468 KB)


(Loïc Joly) #7

Ok so second part of the issue is solved. Let’s go back to first part.

How do you compile the code on you environment? Can you tell use the exact command line? Does it compile correctly?


(Julinx2) #8

I do not compile them, these files are from a client who wants to evaluate if they integrate sonarcube, they have many c files, I would say 500,000 rows and they need to test with this file, but in the test they do, it only throws duplicate code in sonarqube , or test on your pc quisaz leaves only duplicate code as a result in sonarqube Thank you


(Loïc Joly) #9

The first step to analyze C code is first to build it (just to make sure that it works), then build it again, but from the build wrapper to get some required and important information about what happens during the build, then only run the analysis itself.

If you can’t build the code, you won’t be able to analyze it.


(Julinx2) #10

Puede enviarme un código para probar mi servidor y probar lo que indique, por favor.


(Julinx2) #11

You can send me some code to test my server and test what you indicate please.


(Loïc Joly) #12

Sorry, but I don’t understand what you ask. To analyze C code, you first have to build it. If you don’t know how to build it, you should ask assistance to people to first wrote it.


(Julinx2) #13
OK thanks