Thread: GCC memory & pathing problems

  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839

    GCC memory & pathing problems

    I got this output:
    Code:
    lake OUT_BIT=64 debug (in directory: O:\Data\C_Playground\lake)
    setenvs: ["C_INCLUDE_PATH"] = "O:\Data\C_Playground\lua64-53\include;O:\Common\MinGW64\include;O:\Common\MinGW64\include\freetype2"
    setenvs: ["X_DISTRO"] = "nuwen"
    setenvs: ["PATH"] = "O:\Data\C_Playground\lua64-53;O:\Common\MinGW64\bin;X:\PortableApps\GeanyPortable\App\Geany\bin;X:\PortableApps\GeanyPortable\App\Geany\bin;;O:\Common\lake64;O:\Common\lake32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;A:\Tools\WinSDK\10\Windows Performance Toolkit\;C:\Users\awsde_000\AppData\Local\Microsoft\WindowsApps;;O:\Common\MinGW64\bin;X:\PortableApps\GeanyPortable\App\Geany\bin;X:\PortableApps\GeanyPortable\App\Geany\bin;;O:\Common\lake64;O:\Common\lake32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;A:\Tools\WinSDK\10\Windows Performance Toolkit\;C:\Users\awsde_000\AppData\Local\Microsoft\WindowsApps;"
    setenvs: ["CPLUS_INCLUDE_PATH"] = "O:\Data\C_Playground\lua64-53\include;O:\Common\MinGW64\include;O:\Common\MinGW64\include\freetype2"
    gcc --pass-exit-codes -Wall -l lua53 -mconsole -mwindows -mwin32 -m64 -D _WIN64 -c "lake.c" -o "obj/lake.c.o"
    <built-in>: internal compiler error: Segmentation fault
    libbacktrace could not find executable to open
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <http://gcc.gnu.org/bugs.html> for instructions.
    stack traceback:
    	[string "..."]:15: in function 'fault'
    	makefile.lua:304: in field 'objects'
    	makefile.lua:315: in field 'binaries'
    	makefile.lua:331: in main chunk
    Fatal Lua Error!
    makefile.lua:315: Object lake.c.o failed to compile with result 4!
    stack traceback:
    Compilation failed.
    After a major overhall of my makefile to simplify it for eventual release (I intend it to be under MIT License) I ended up with above error but I don't fully understand it, I get that it's having memory problems but given how small my project is (2 files, my own and the 3rd party argparser) I don't think it's because of to many variables so I concluded that it would be a pathing problem instead, since I'm not able to figure it out myself I'd like the help of someone experienced enough in GCC stuff to point it out or at least point me in the suspected direction if you can't be sure.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,686
    > libbacktrace could not find executable to open
    It looks like you mucked up your PATH environment variable.
    Code:
    $ xsel | sed 's/;/\n/g'
    setenvs: ["PATH"] = "O:\Data\C_Playground\lua64-53
    O:\Common\MinGW64\bin
    X:\PortableApps\GeanyPortable\App\Geany\bin
    X:\PortableApps\GeanyPortable\App\Geany\bin
    
    O:\Common\lake64
    O:\Common\lake32
    C:\WINDOWS\system32
    C:\WINDOWS
    C:\WINDOWS\System32\Wbem
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    A:\Tools\WinSDK\10\Windows Performance Toolkit\
    C:\Users\awsde_000\AppData\Local\Microsoft\WindowsApps
    
    O:\Common\MinGW64\bin
    X:\PortableApps\GeanyPortable\App\Geany\bin
    X:\PortableApps\GeanyPortable\App\Geany\bin
    
    O:\Common\lake64
    O:\Common\lake32
    C:\WINDOWS\system32
    C:\WINDOWS
    C:\WINDOWS\System32\Wbem
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    A:\Tools\WinSDK\10\Windows Performance Toolkit\
    C:\Users\awsde_000\AppData\Local\Microsoft\WindowsApps
    "
    Can you compile from the command line (outside your makefile)?
    If so, what is your real PATH variable before all those A/O/X drives make an appearance?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839
    Found the cause, I think...
    I tried to be clever when I launched Geany by having a batch file append both the 32bit path and the 64bit path of lake to the PATH in a way the system would attempt 64bit variant first, despite not having MinGW's paths added until before execution of gcc and subsequently removed after completion the compiler didn't seem to like that scenario, perhaps windows is not smart enough to launch 64bit from 32bit and vice verser?

  4. #4
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    839
    Was a little late to notice there was a reply (noticed via my emails when I sent one to the argparse developer asking if there were any functions that provided an on instance functionality as I didn't see any)
    Quote Originally Posted by Salem View Post
    > libbacktrace could not find executable to open
    It looks like you mucked up your PATH environment variable.
    Yeah I had guessed that as mentioned before in the primary post
    Quote Originally Posted by Salem View Post
    Can you compile from the command line (outside your makefile)?
    At that time I technically couldn't since I had introduced bugs unintentionally, those are fixed now and I can run just fine after separating the addition of lake directories to the PATH variable, lesson temporarily learned, don't try to be clever
    Quote Originally Posted by Salem View Post
    If so, what is your real PATH variable before all those A/O/X drives make an appearance?
    Ignore the X/O ones basically, those 2 are the added ones from the launch of the batch file that start geany after adding lake directories to the PATH variable, A is added via 1 or more system variables as I set that for installing stuff and keeping my user data.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help Problems in memory
    By askno in forum C++ Programming
    Replies: 4
    Last Post: 12-28-2009, 08:53 PM
  2. fread problems or memory problems
    By Lechuza in forum C Programming
    Replies: 1
    Last Post: 03-22-2009, 12:45 PM
  3. Help with memory problems!
    By ay_okay in forum C++ Programming
    Replies: 7
    Last Post: 12-20-2004, 08:35 AM
  4. Memory problems (?)
    By ChadJohnson in forum C++ Programming
    Replies: 2
    Last Post: 05-17-2004, 12:17 AM
  5. need help with memory problems
    By neandrake in forum C++ Programming
    Replies: 7
    Last Post: 11-20-2003, 11:40 AM

Tags for this Thread