Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Object files deleted during build of gcc needed by gdb #35734

Closed
lgstarn opened this issue Jan 10, 2015 · 5 comments
Closed

Object files deleted during build of gcc needed by gdb #35734

lgstarn opened this issue Jan 10, 2015 · 5 comments

Comments

@lgstarn
Copy link

lgstarn commented Jan 10, 2015

The temporary files that are created as gcc is built are put into a /tmp directory like so:

...
/private/tmp/gcc-VWmKFo/gcc-4.9.2/build/x86_64-apple-darwin14.0.0/libquadmath/.libs/ctanq.o
...

However, once the build is over, those temporary files are deleted.

Once gdb is installed, any program built with gcc and run with gdb gives the following warnings on start-up that it can't find those build files:

...
warning: `/tmp/gcc-VWmKFo/gcc-4.9.2/build/x86_64-apple-darwin14.0.0/libquadmath/.libs/ctanq.o': can't open to read symbols: No such file or directory.
...

Question: is there a way to keep the object build files from gcc so gdb will not give this long list of errors?

Steps to recreate issue (new install, brew doctor states ready to brew):

  • brew install gcc
  • brew install gdb
  • (codesign gdb)
  • gfortran -c -g hello.f90
  • gfortran -g hello.o -o hello.exe
  • gdb hello.exe
  • press "r" to run
  • note the hundreds of warnings for files that were deleted during the build process

hello.f90:
program hello
implicit none

print *,'hello'

end program

@tdsmith
Copy link
Contributor

tdsmith commented Jan 10, 2015

This has similar symptomology to #34976; do you think it's the same issue?

@lgstarn
Copy link
Author

lgstarn commented Jan 11, 2015

Hi tdsmith, thanks for the response. I commented on 34976 that I am able to get gdb to work on that example by outputting to an intermediate .o file.

I'd like to understand if it is possible to get rid of the hundreds of "warning: `/private/tmp/gcc-rxyDVc/gcc-4.9.2/build/x86_64-apple-darwin14.0.0/libgcc/unwind-dw2-fde-darwin_s.o': can't open to read symbols: No such file or directory" that appear in both my test case and #34976. I think a fix will be to save those temporary files that are built. Is there a mechanism within homebrew to save the temporary files? Or is this purely an upstream issue with gcc?

@gautamg795
Copy link

I'm having similar issues -- I suspect this is related?

@MikeMcQuaid
Copy link
Member

@gautamg795 Yeh, sounds like it.

@tdsmith
Copy link
Contributor

tdsmith commented Apr 5, 2016

Dunno what to do about this; please consult the gcc community and let us know if we can do something to resolve this.

@tdsmith tdsmith closed this as completed Apr 5, 2016
@Homebrew Homebrew locked and limited conversation to collaborators Jul 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants