Opened 14 years ago

Closed 14 years ago

#24839 closed defect (worksforme)

Standard header files such as stdio.h not found when trying to build port "cc65"

Reported by: petruzanautico@… Owned by: trashgod
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc:
Port: cc65

Description (last modified by jmroot (Joshua Root))

I try to install port "cc65" (port install cc65) and in the building phase, three standard C headers are reported missing: stdarg.h, stdio.h & stdlib.h There are several more errors, but I guess they are caused by the headers not being found. May this be a problem of configuration? How can I configure Macports to correctly find those headers? Thanks.


Complete error message:

$ sudo port -d install cc65
DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/cc65
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/cc65
DEBUG: OS Platform: darwin
DEBUG: OS Version: 10.3.0
DEBUG: Mac OS X Version: 10.6
DEBUG: System Arch: i386
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: not using configure, so not adding the default universal variant
DEBUG: Requested variant darwin is not provided by port cc65.
DEBUG: Requested variant i386 is not provided by port cc65.
DEBUG: Requested variant macosx is not provided by port cc65.
--->  Computing dependencies for cc65
DEBUG: Executing org.macports.main (cc65)
DEBUG: Skipping completed org.macports.fetch (cc65)
DEBUG: Skipping completed org.macports.checksum (cc65)
DEBUG: setting option extract.cmd to /usr/bin/bzip2
DEBUG: Skipping completed org.macports.extract (cc65)
DEBUG: Skipping completed org.macports.patch (cc65)
DEBUG: Skipping completed org.macports.configure (cc65)
--->  Building cc65
DEBUG: Executing org.macports.build (cc65)
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6' PREFIX='/opt/local'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_cc65/work/cc65-2.13.0/src" && /Developer/usr/bin/make -j2 all -f make/gcc.mak CC=/usr/bin/gcc-4.2'
for i in common ar65 ca65 cc65 cl65 co65 da65 grc ld65 od65; do /Developer/usr/bin/make -C $i -f make/gcc.mak all || exit $?; done
/usr/bin/gcc-4.2 -g -O2 -Wall -W -std=c89   -c -o abend.o abend.c
/usr/bin/gcc-4.2 -g -O2 -Wall -W -std=c89   -c -o addrsize.o addrsize.c
In file included from addrsize.c:38:
strutil.h:41:20: error: stdlib.h: No such file or directory
In file included from addrsize.c:38:
strutil.h:51: error: expected declaration specifiers or '...' before 'size_t'
make[1]: *** [addrsize.o] Error 1
make[1]: *** Waiting for unfinished jobs....
abend.c:36:20: error: stdarg.h: No such file or directory
abend.c:37:19: error: stdio.h: No such file or directory
abend.c:38:20: error: stdlib.h: No such file or directory
abend.c: In function 'AbEnd':
abend.c:56: error: 'va_list' undeclared (first use in this function)
abend.c:56: error: (Each undeclared identifier is reported only once
abend.c:56: error: for each function it appears in.)
abend.c:56: error: expected ';' before 'ap'
abend.c:59: warning: implicit declaration of function 'fprintf'
abend.c:59: warning: incompatible implicit declaration of built-in function 'fprintf'
abend.c:59: error: 'stderr' undeclared (first use in this function)
abend.c:62: warning: implicit declaration of function 'va_start'
abend.c:62: error: 'ap' undeclared (first use in this function)
abend.c:63: warning: implicit declaration of function 'vfprintf'
abend.c:64: warning: implicit declaration of function 'va_end'
abend.c:70: warning: implicit declaration of function 'exit'
abend.c:70: warning: incompatible implicit declaration of built-in function 'exit'
abend.c:70: error: 'EXIT_FAILURE' undeclared (first use in this function)
make[1]: *** [abend.o] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_cc65/work/cc65-2.13.0/src" && /Developer/usr/bin/make -j2 all -f make/gcc.mak CC=/usr/bin/gcc-4.2 " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_cc65/work/cc65-2.13.0/src" && /Developer/usr/bin/make -j2 all -f make/gcc.mak CC=/usr/bin/gcc-4.2 " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for cc65): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Change History (12)

comment:1 Changed 14 years ago by petruzanautico@…

The make file 'gcc.mak' for port cc65 has this lines:

# The install prefix and directories
prefix = /usr/local
exec_prefix = $(prefix)

bindir = $(exec_prefix)/bin
datadir = $(prefix)/share
docdir = $(datadir)/doc
libdir = $(exec_prefix)/lib

CC65_DOC = $(docdir)/cc65
CC65_HOME = $(libdir)/cc65

CA65_INC = $(CC65_HOME)/asminc
CC65_INC = $(CC65_HOME)/include
LD65_CFG = $(CC65_HOME)/cfg
LD65_LIB = $(CC65_HOME)/lib
LD65_OBJ = $(CC65_HOME)/obj

I'm not really good with make files, but I guess from those lines that make is expecting include files to be at /usr/local/lib/cc65/include

I copied cc65 sources to /usr/local/lib/cc65/ so paths would match, but didn't build either.

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Cc: petruzanautico@… removed
Description: modified (diff)
Keywords: port install cc65 removed
Owner: changed from macports-tickets@… to trashgod@…

Please remember to preview and use WikiFormatting, and cc the maintainer. Note that you do not need to be in cc when you are the reporter.

comment:3 Changed 14 years ago by petruzanautico@…

Thanks! I couldn't find the way to edit the original message after I saw its format get messy

comment:4 Changed 14 years ago by petruzanautico@…

Cc: petruzanautico@… added

Cc Me!

comment:5 Changed 14 years ago by petruzanautico@…

Cc: petruzanautico@… removed

Cc Me!

comment:6 Changed 14 years ago by petruzanautico@…

Should I add the maintainer to the CC: ? I can't find how to do it or how to change anything at all

comment:7 in reply to:  1 Changed 14 years ago by trashgod

Replying to petruzanautico@…:

I guess from those lines that make is expecting include files to be at /usr/local/lib/cc65/include.

No, that's where cc65 itself expects to find Apple II include files when compiling Apple II sources. The portfile's destroot has corresponding install commands that put the Apple II include files where cc65 expects them.

I am able to build and install on Mac OS X 10.5.8, using gcc 4.0.1, installed with Xcode 3.1.2. I am puzzled by your environment: I have not seen /Developer/usr/bin/make in an assembled command before. Are stdarg.h et al visible to other ports?

$ port -d install cc65
...
DEBUG: OS Platform: darwin
DEBUG: OS Version: 9.8.0
DEBUG: Mac OS X Version: 10.5
...
DEBUG: Using compiler 'Mac OS X gcc 4.0'
...
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.5' PREFIX='/opt/local'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_cc65/work/cc65-2.13.0/src"
&& /usr/bin/make -j1 all -f make/gcc.mak CC=/usr/bin/gcc-4.0'

comment:8 Changed 14 years ago by petruzanautico@…

Well, /Developer/usr/bin/ is the default directory were XCode 3.2.2 installs its tools. I'm guessing this is probably the root of the problems, I've seen many make files refering to /usr/bin instead. Anyway, I managed to build cc65 directly from sources, including them by hand in an XCode project instead of using gcc directly. Bu thanks for answering!

comment:9 Changed 14 years ago by petruzanautico@…

I would close this ticket but there doesn't seem to be any way for me to do it.

comment:10 in reply to:  8 Changed 14 years ago by trashgod

Replying to petruzanautico@…:

Well, /Developer/usr/bin/ is the default directory were XCode 3.2.2 installs its tools. I'm guessing this is probably the root of the problems, I've seen many make files refering to /usr/bin instead. Anyway, I managed to build cc65 directly from sources, including them by hand in an XCode project instead of using gcc directly. Bu thanks for answering!

Excellent. /Developer/usr/bin/ appears to reflect /usr/bin/. Here's the PATH I used in ~/.bash_profile: /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin. Sorry I couldn't be more help.

comment:11 in reply to:  9 Changed 14 years ago by trashgod

Replying to petruzanautico@…:

I would close this ticket but there doesn't seem to be any way for me to do it.

Nor for me; resolution is probably above my pay grade. :-)

comment:12 Changed 14 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.