From: Jeffrey Walton <noloader@gmail.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: Jonah Graham <jonah@kichwacoders.com>,
Mahmood Naderan via Gdb <gdb@sourceware.org>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: Error "No source file named"
Date: Sun, 8 Aug 2021 12:45:00 -0400 [thread overview]
Message-ID: <CAH8yC8nAn1LUmBwvGpe51jrUBjda2W4qQ68-NYxFAK5+6Vh5Og@mail.gmail.com> (raw)
In-Reply-To: <2120078511.233484.1628440503952@mail.yahoo.com>
On Sun, Aug 8, 2021 at 12:35 PM Mahmood Naderan via Gdb
<gdb@sourceware.org> wrote:
>
> >Could you have two copies of shader.o hanging about?
>
> Jonah, Thanks for the tip. I checked more and see
>
>
> g++ -g3 -fPIC -DCUDART_VERSION=11020 -Wall -DDEBUG -DTRACING_ON=1 -std=c++0x -ggdb \
> -I/usr/local/cuda-11.2/include -I/home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/src/gpuwattch/ \
> -DGPGPUSIM_POWER_MODEL -o /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/shader.o \
> -c shader.cc
>
>
> ar rcs /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/libgpu_uarch_sim.a \
> /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/shader.o \
> ...
>
>
> g++ -shared -Wl,-soname,libcudart.so -Wl,--version-script=linux-so-version.txt \
> ...
> /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/build/gcc-9.3.0/cuda-11020/debug/gpgpu-sim/*.o \
> -o lib/gcc-9.3.0/cuda-11020/debug/libcudart.so
>
>
>
>
>
> And the final binary depends on the libcudart.so
>
> $ ldd gpu-simulator/bin/debug/accel-sim.out
> linux-vdso.so.1 (0x00007fffc01c3000)
> libcudart.so => /home/mahmood/accel-sim-framework/gpu-simulator/gpgpu-sim/lib/gcc-9.3.0/cuda-11020/debug/libcudart.so (0x00007f7c3e8f4000)
> libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7c3e6f0000)
> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7c3e6d5000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7c3e6b2000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7c3e4c0000)
> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7c3e4a2000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7c3e353000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f7c3f2dc000)
>
> Do you also confirm that shader.cc symbols must be in the final binary?
You might also find -fdebug-prefix-map useful. It allows you to tell
the debugger where to locate source files for object files if the
source files have been relocated to a directory like /lib/src. It may
help here, too.
Jeff
next prev parent reply other threads:[~2021-08-08 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <767694398.211875.1628429913388.ref@mail.yahoo.com>
2021-08-08 13:38 ` Mahmood Naderan
2021-08-08 14:35 ` Eli Zaretskii
2021-08-08 15:06 ` Mahmood Naderan
2021-08-08 15:31 ` Andreas Schwab
2021-08-08 16:01 ` Mahmood Naderan
2021-08-08 16:12 ` Jonah Graham
2021-08-08 16:35 ` Mahmood Naderan
2021-08-08 16:45 ` Jeffrey Walton [this message]
2021-08-08 17:15 ` Mahmood Naderan
2021-08-08 22:25 ` Jeffrey Walton
2021-08-09 8:36 ` Mahmood Naderan
2021-08-08 20:51 ` Jonah Graham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAH8yC8nAn1LUmBwvGpe51jrUBjda2W4qQ68-NYxFAK5+6Vh5Og@mail.gmail.com \
--to=noloader@gmail.com \
--cc=gdb@sourceware.org \
--cc=jonah@kichwacoders.com \
--cc=nt_mahmood@yahoo.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).