Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jimtcl fails with stdlib.h not found #54

Open
ksjogo opened this issue Mar 1, 2013 · 14 comments
Open

jimtcl fails with stdlib.h not found #54

ksjogo opened this issue Mar 1, 2013 · 14 comments

Comments

@ksjogo
Copy link

ksjogo commented Mar 1, 2013

Summoning fails for me:
=== configuring in jimtcl (/Users/ksjogo/arm/summon-arm-toolchain/build/jimtcl) configure: running /bin/sh ../../openocd-0.6.1/jimtcl/configure.gnu --disable-option-checking '--prefix=/Users/ksjogo/sat' '--enable-maintainer-mode' '--disable-werror' '--enable-dummy' '--enable-ft2232_libftdi' '--enable-usb_blaster_libftdi' '--enable-ep93xx' '--enable-at91rm9200' '--enable-presto_libftdi' '--enable-usbprog' '--enable-jlink' '--enable-vsllink' '--enable-rlink' '--enable-arm-jtag-ew' '--enable-stlink' 'CFLAGS= -I/opt/mine/include -I/usr/local/include' 'LDFLAGS= -L/opt/mine/lib -L/usr/local/lib' --cache-file=/dev/null --srcdir=../../openocd-0.6.1/jimtcl Host System...x86_64-apple-darwin11.4.2 Build System...x86_64-apple-darwin11.4.2 C compiler... cc -I/opt/mine/include -I/usr/local/include C++ compiler... c++ -I/opt/mine/include -I/usr/local/include Build C compiler...cc Checking for stdlib.h...not found Error: Compiler does not work. See config.log Try: 'configure --help' for options configure: error: ../../openocd-0.6.1/jimtcl/configure.gnu failed for jimtcl
Anyone to fix this?
What are the /opt/mine/lib parts? They are hardcoded in the script but not present on everyones mac.

@jhgorse
Copy link

jhgorse commented Mar 16, 2013

The /opt/mine/lib parts seem to be from an SVN include somewhere for OOCD... not sure it ought to be there. Nevertheless, it's not likely your issue though I removed it from my version.

Here's what I have found so far...

Open: summon-arm-toolchain/openocd-0.6.1/jimtcl/autosetup/cc.tcl
Commented out what was line 499 for me

        switch -glob -- [get-define host] {
                *-*-darwin* {
                        # Don't generate .dSYM directories
#                       lappend cmdline -gstabs
                }
        }
        lappend cmdline $src -o $tmp {*}$opts(-libs)

-gstabs is a gcc-only option which does not exist for llvm variants of cc, so we are disabling this Darwin-only linker thing from Autosetup. This only seems to work if you configure/build jimtcl manually.

@msteveb
Copy link

msteveb commented Mar 18, 2013

You are building on darwin, targetting darwin.

Host System...x86_64-apple-darwin11.4.2
Build System...x86_64-apple-darwin11.4.2

Which cc are you using? It should support -gstabs.
Check your $PATH?
Can you provide config.log?

@ksjogo
Copy link
Author

ksjogo commented Mar 18, 2013

CC -v Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix

What does need to be in the path?

@msteveb
Copy link

msteveb commented Mar 18, 2013

I wonder if you are pulling in cc from somewhere else, not the host cc. Can you provide the config.log?

@rbarris
Copy link

rbarris commented Mar 20, 2013

It looks like clang doesn't support -gstabs, but llvm-gcc does. So if your CC points to clang, it's no go.

nv-rbarris-mbp:~ rbarris$ CC -v
Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

nv-rbarris-mbp:~ rbarris$ CC -gstabs
clang: error: unsupported option '-gstabs'
clang: error: no input files

nv-rbarris-mbp:~ rbarris$ llvm-gcc --version -gstabs
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

nv-rbarris-mbp:~ rbarris$ llvm-gcc -gstabs
i686-apple-darwin11-llvm-gcc-4.2: no input files

@msteveb
Copy link

msteveb commented Mar 20, 2013

Not sure why you are testing CC (the C++ compiler). Test cc (the C compiler) instead.

@rbarris
Copy link

rbarris commented Mar 20, 2013

Same really - 'cc' maps to clang by default, and clang doesn't support gstabs. This is Xcode 4.6.1 with the latest command line tools package.

nv-rbarris-mbp:~ rbarris$ which cc
/usr/bin/cc

nv-rbarris-mbp:~ rbarris$ cc --version
Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

nv-rbarris-mbp:~ rbarris$ cc -gstabs
clang: error: unsupported option '-gstabs'
clang: error: no input files

@msteveb
Copy link

msteveb commented Mar 20, 2013

OK. This must be a recent change. I'll come up with a check for this.

@msteveb
Copy link

msteveb commented Mar 20, 2013

@ksjogo
Copy link
Author

ksjogo commented Apr 3, 2013

The patch works.

@Tylerflick
Copy link

I'm still running into this issue with the patch applied.

@msteveb
Copy link

msteveb commented Jun 12, 2013

@Tylerflick you will need to provide your config.log if you want me to investigate this further

@msteveb
Copy link

msteveb commented Mar 21, 2019

Are you sure this is the same issue? The OP was building on macosx, but you look like you are building on msys. If it is different, please open a separate ticket.
In any case, run 'configure --debug' and post your config.log and the complete output of configure

@ljy545
Copy link

ljy545 commented Mar 21, 2019

Are you sure this is the same issue? The OP was building on macosx, but you look like you are building on msys. If it is different, please open a separate ticket.
In any case, run 'configure --debug' and post your config.log and the complete output of configure

ok,sorry!,delete it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants