Follow us on Twitter!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 25
Guests Online: 24
Members Online: 1

Registered Members: 82832
Newest Member: SerMSYS
Latest Articles
View Thread

HellBound Hackers | Computer General | Trouble Shooting

Author

Issues with gcc and compiling programs on Mac

t0xikc0mputer
Member



Posts: 112
Location: t0xik waste dump
Joined: 07.01.11
Rank:
Newbie
Posted on 08-07-11 17:35
Hey everybody. I haven't been here (on the forums) in quite a long while. Despite that, I have been hanging around the IRC. Sorry, I don't even know why I needed to bring that up.

The current issue that I'm having, long story short, is with gcc. For quite a while, I had been trying to bootstrap gcc, although very unsuccessfully. Then, I found the .dmg file for the correct version of Xcode that works with my old PPC iBook G4 with 10.4 Tiger. I installed it, and then tried ./configure with the program I was trying to compile (irssi). Same error as before I had installed gcc 4.0. Then, I realized that I should check out /usr/bin to see what I could see. I found that there was no gcc, but there was a gcc-4.0 file. I renamed it to gcc, and tried ./configure again. There were two more errors that I decided that I wanted to fix,

configure: error: C compiler cannot create executables


and

checking whether make sets $(MAKE)... no


I can easily paste the rest of what ./configure printed, but I figured that that was the only thing that stands in the way of me compiling irssi.

I guess that it was not long story short, but long story shorter. Anyways, if you can help me at all, I would appreciate it. It would also be helpful (if not just slightly less) if people could also give info on how they would do that on their linux, as I know many people here use linux.

Thanks in advance for all help I will receive with this issue,

~t0xik


Author

RE: Issues with gcc and compiling programs on Mac

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 08-07-11 20:57
Post the entire compile output, the result of gcc -v, and the contents of config.log (if it made one).


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
http://www.stealth-x.com
Author

RE: Issues with gcc and compiling programs on Mac

t0xikc0mputer
Member



Posts: 112
Location: t0xik waste dump
Joined: 07.01.11
Rank:
Newbie
Posted on 09-07-11 00:37
aight stealth...

compile output:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... none
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/t0xik/Desktop/Downloads/irssi-0.8.15':
configure: error: C compiler cannot create executables
See `config.log' for more details.


gcc -v output:
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5370)


config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by irssi configure 0.8.15, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = *********.home
uname -m = Power Macintosh
uname -r = 8.11.0
uname -s = Darwin
uname -v = Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 1.00 gigabytes
Default processor set: 102 tasks, 312 threads, 1 processors
Load average: 3.16, Mach factor: 0.33
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /Library/Frameworks/Python.framework/Versions/3.2/bin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2613: checking for a BSD-compatible install
configure:2681: result: /usr/bin/install -c
configure:2692: checking whether build environment is sane
configure:2742: result: yes
configure:2883: checking for a thread-safe mkdir -p
configure:2922: result: build-aux/install-sh -c -d
configure:2935: checking for gawk
configure:2965: result: no
configure:2935: checking for mawk
configure:2965: result: no
configure:2935: checking for nawk
configure:2965: result: no
configure:2935: checking for awk
configure:2951: found /usr/bin/awk
configure:2962: result: awk
configure:2973: checking whether make sets $(MAKE)
configure:2999: result: no
configure:3068: checking whether to enable maintainer-specific portions of Makefiles
configure:3077: result: no
configure:3103: checking for style of include used by make
configure:3131: result: none
configure:3201: checking for gcc
configure:3217: found /usr/bin/gcc
configure:3228: result: gcc
configure:3457: checking for C compiler version
configure:3466: gcc --version >&5
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)
Copyright (C) 2005 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.

configure:3477: $? = 0
configure:3466: gcc -v >&5
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5370)
configure:3477: $? = 0
configure:3466: gcc -V >&5
gcc: argument to `-V' is missing
configure:3477: $? = 1
configure:3466: gcc -qversion >&5
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-qversion'
powerpc-apple-darwin8-gcc-4.0.1: no input files
configure:3477: $? = 1
configure:3497: checking whether the C compiler works
configure:3519: gcc conftest.c >&5
powerpc-apple-darwin8-gcc-4.0.1: installation problem, cannot exec 'as': No such file or directory
configure:3523: $? = 1
configure:3561: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "irssi"
| #define PACKAGE_TARNAME "irssi"
| #define PACKAGE_VERSION "0.8.15"
| #define PACKAGE_STRING "irssi 0.8.15"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3566: error: in `/Users/t0xik/Desktop/Downloads/irssi-0.8.15':
configure:3570: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_SSL_CFLAGS_set=
ac_cv_env_SSL_CFLAGS_value=
ac_cv_env_SSL_LIBS_set=
ac_cv_env_SSL_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=no

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run tar'
AR=''
AUTOCONF='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run automake-1.11'
AWK='awk'
BUILD_IRSSIBOT_FALSE=''
BUILD_IRSSIBOT_TRUE=''
BUILD_IRSSIPROXY_FALSE=''
BUILD_IRSSIPROXY_TRUE=''
BUILD_TEXTUI_FALSE=''
BUILD_TEXTUI_TRUE=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CHAT_MODULES=''
COMMON_LIBS=''
COMMON_NOUI_LIBS=''
CPP=''
CPPFLAGS=''
CURSES_INCLUDEDIR=''
CURSES_LIBS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GLIB_CFLAGS=''
GLIB_GENMARSHAL=''
GLIB_LIBS=''
GLIB_MKENUMS=''
GOBJECT_QUERY=''
GREP=''
HAVE_PERL_FALSE=''
HAVE_PERL_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/missing --run makeinfo'
MKDIR_P='build-aux/install-sh -c -d'
NEED_TPARM_FALSE=''
NEED_TPARM_TRUE=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='irssi'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='irssi'
PACKAGE_STRING='irssi 0.8.15'
PACKAGE_TARNAME='irssi'
PACKAGE_URL=''
PACKAGE_VERSION='0.8.15'
PATH_SEPARATOR=':'
PERL_CFLAGS=''
PERL_EXTRA_OPTS=''
PERL_FE_LINK_LIBS=''
PERL_LDFLAGS=''
PERL_LINK_FLAGS=''
PERL_LINK_LIBS=''
PERL_MM_PARAMS=''
PERL_STATIC_LIBS=''
PERL_USE_LIB=''
PKG_CONFIG=''
PROG_LIBS=''
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
SSL_CFLAGS=''
SSL_LIBS=''
STRIP=''
TEXTUI_LIBS=''
USE_CURSES_FALSE=''
USE_CURSES_TRUE=''
VERSION='0.8.15'
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='#'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/t0xik/Desktop/Downloads/irssi-0.8.15/build-aux/install-sh'
irc_MODULES=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='$(top_builddir)/build-aux/install-sh -c -d'
oldincludedir='/usr/include'
pdfdir='${docdir}'
perl_module_fe_lib=''
perl_module_lib=''
perl_static_fe_lib=''
perl_static_lib=''
perlpath=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sedpath=''
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "irssi"
#define PACKAGE_TARNAME "irssi"
#define PACKAGE_VERSION "0.8.15"
#define PACKAGE_STRING "irssi 0.8.15"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77



So, after looking a bit, on a different forum website, I found something that said that someone with the same issue solved it because they needed to install g++ and they did. It came with g++, but it was labeled g++-4.0. I renamed it to just 'g++' but it still didn't work. Just wanted to note so that no one recommends this.

Once again, thanks in advance for all help!

~t0xik


Author

RE: Issues with gcc and compiling programs on Mac


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-07-11 01:04
t0xikc0mputer wrote:
So, after looking a bit, on a different forum website, I found something that said that someone with the same issue solved it because they needed to install g++ and they did. It came with g++, but it was labeled g++-4.0. I renamed it to just 'g++' but it still didn't work. Just wanted to note so that no one recommends this.

Not surprising that that wouldn't work, g++ is specifically for C++ files, it should make no difference for C files.
Anyhow, it looks like you don't have 'as', a part of the binutils package, sort of necessary as is the rest of that package.


Author

RE: Issues with gcc and compiling programs on Mac

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 09-07-11 01:06
Code
configure:3497: checking whether the C compiler works
configure:3519: gcc conftest.c >&5
powerpc-apple-darwin8-gcc-4.0.1: installation problem, cannot exec 'as': No such file or directory
configure:3523: $? = 1
configure:3561: result: no





There is a problem with your GCC installation. "as" is a program that is required for GCC to function, it's the assembler. The test is failing because GCC can't find that program. You have to ensure it's installed, and make sure it is in your path so that GCC can find it.

t0xikc0mputer wrote:
So, after looking a bit, on a different forum website, I found something that said that someone with the same issue solved it because they needed to install g++ and they did. It came with g++, but it was labeled g++-4.0. I renamed it to just 'g++' but it still didn't work. Just wanted to note so that no one recommends this.


There are a lot of things that can cause the "cannot create executables" error. You have to usually look at the config.log file to see what's really going on.

Once again, thanks in advance for all help!


Np, Good luck :)


EDIT: Ah, COM beat me to it ;)


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .

Edited by stealth- on 09-07-11 01:07
http://www.stealth-x.com
Author

RE: Issues with gcc and compiling programs on Mac

t0xikc0mputer
Member



Posts: 112
Location: t0xik waste dump
Joined: 07.01.11
Rank:
Newbie
Posted on 09-07-11 01:51
So, I seem to have a little issue with installing GAS. It needs to be compiled, but how would I compile it if it's necessary to the compilation process!!

I'm just confused about how to do this.

~t0xik

EDIT: W00t!!!!!!! This is my 111th post!!!!!!!!!




Edited by t0xikc0mputer on 09-07-11 02:13
Author

RE: Issues with gcc and compiling programs on Mac


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 09-07-11 12:49
t0xikc0mputer wrote:
So, I seem to have a little issue with installing GAS. It needs to be compiled, but how would I compile it if it's necessary to the compilation process!!

Your initial post left this in ambiguity, but let's just make sure: did you actually install gcc from your XcodeTools.mpkg package? If not, remove your current gcc and do so.


Author

RE: Issues with gcc and compiling programs on Mac

t0xikc0mputer
Member



Posts: 112
Location: t0xik waste dump
Joined: 07.01.11
Rank:
Newbie
Posted on 09-07-11 17:01
COM wrote:
Your initial post left this in ambiguity, but let's just make sure: did you actually install gcc from your XcodeTools.mpkg package? If not, remove your current gcc and do so.


I was sooo confused on the idea of bootstrapping, so I looked a little harder for a precompiled package, and I did indeed use that. What I'm confused about, is if it's a package you just install, why didn't it come with all the necessary parts? Whatever. I also don't understand how you're supposed to compile something that's necessary to the compilation process.

Thanks,
~t0xik


Author

RE: Issues with gcc and compiling programs on Mac

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 10-07-11 18:55
t0xikc0mputer wrote:
COM wrote:
Your initial post left this in ambiguity, but let's just make sure: did you actually install gcc from your XcodeTools.mpkg package? If not, remove your current gcc and do so.


I was sooo confused on the idea of bootstrapping, so I looked a little harder for a precompiled package, and I did indeed use that. What I'm confused about, is if it's a package you just install, why didn't it come with all the necessary parts?


Afaik, it does. Did you enable UNIX Development support?

I also don't understand how you're supposed to compile something that's necessary to the compilation process.


You aren't. I'm not entirely sure what you are doing/trying to do, lol.


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
http://www.stealth-x.com