Hi all,
Ich habe ein großes Problem. Ich versuche die Installation eines 264 Video-Encoder (JM 15.1, von
H.264/AVC JM Referenz-Software-Download) Unter OS X 10.5.5.
Zunächst musste ich deaktivieren statischen Zusammenstellung, denn für diesen Fehler:
Code:
ld_classic: can't locate file for: -lcrt0.o
Ich habe dazu einige Foren und behinderte statischen Erfassung in Makefile, und es wurde gelöst. Jetzt bekomme ich diese Fehlermeldung:
Code:
creating binary "../bin/lencod.exe"
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _rc_init_GOP from obj/rc_quadratic.o not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
collect2: ld returned 1 exit status
und hier ist das Makefile:
Code:
NAME= lencod
### include debug information: 1=yes, 0=no
DBG?= 0
### Generate 32 bit executable : 1=yes, 0=no
M32?= 0
### include O level optimization : 0-3
OPT?= 3
### Static Compilation
STC?= 0
DEPEND= dependencies
BINDIR= ../bin
INCDIR= inc
SRCDIR= src
OBJDIR= obj
ADDSRCDIR= ../lcommon/src
ADDINCDIR= ../lcommon/inc
ifeq ($(M32),1)
CC= gcc -m32
else
CC= gcc
endif
ifeq ($(STC),1)
ifeq ($(DBG),1) ### Do not use static compilation for Debug mode
STC=0
STATIC=
else
STATIC= -static
endif
else
STATIC=
endif
LIBS= -lm $(STATIC)
AFLAGS=
CFLAGS= -std=gnu99 -pedantic -ffloat-store -fno-strict-aliasing -fsigned-char $(STATIC)
FLAGS= $(CFLAGS) -Wall -I$(INCDIR) -I$(ADDINCDIR) -D __USE_LARGEFILE64 -D _FILE_OFFSET_BITS=64
OPT_FLAG = -O$(OPT)
ifeq ($(DBG),1)
SUFFIX= .dbg
FLAGS+= -g
else
SUFFIX=
FLAGS+= $(OPT_FLAG)
endif
OBJSUF= .o$(SUFFIX)
SRC= $(wildcard $(SRCDIR)/*.c)
ADDSRC= $(wildcard $(ADDSRCDIR)/*.c)
OBJ= $(SRC:$(SRCDIR)/%.c=$(OBJDIR)/%.o$(SUFFIX)) $(ADDSRC:$(ADDSRCDIR)/%.c=$(OBJDIR)/%.o$(SUFFIX))
BIN= $(BINDIR)/$(NAME)$(SUFFIX).exe
.PHONY: default distclean clean tags depend
default: messages objdir_mk depend bin
messages:
ifeq ($(M32),1)
@echo 'Compiling with M32 support...'
endif
ifeq ($(DBG),1)
@echo 'Compiling with Debug support...'
@echo 'Note static compilation not supported in this mode.'
endif
ifeq ($(STC),1)
@echo 'Compiling with -static support...'
endif
ifeq ($(MMX),1)
@echo 'Compiling with MMX support...'
endif
clean:
@echo remove all objects
@rm -rf $(OBJDIR)
distclean: clean
@rm -f $(DEPEND) tags
@rm -f $(BIN)
tags:
@echo update tag table
@ctags inc/*.h src/*.c
bin: $(OBJ)
@echo
@echo 'creating binary "$(BIN)"'
@$(CC) $(AFLAGS) -o $(BIN) $(OBJ) $(LIBS)
@echo '... done'
@echo
depend:
@echo
@echo 'checking dependencies'
@$(SHELL) -ec '$(CC) $(AFLAGS) -MM $(CFLAGS) -I$(INCDIR) -I$(ADDINCDIR) $(SRC) $(ADDSRC) \
| sed '\''s@\(.*\)\.o[ :]@$(OBJDIR)/\1.o$(SUFFIX):@g'\'' \
>$(DEPEND)'
@echo
$(OBJDIR)/%.o$(SUFFIX): $(SRCDIR)/%.c
@echo 'compiling object file "$@" ...'
@$(CC) -c -o $@ $(FLAGS) $<
$(OBJDIR)/%.o$(SUFFIX): $(ADDSRCDIR)/%.c
@echo 'compiling object file "$@" ...'
@$(CC) -c -o $@ $(FLAGS) $<
objdir_mk:
@echo 'Creating $(OBJDIR) ...'
@mkdir -p $(OBJDIR)
-include $(DEPEND)
1. Ich habe für diesen Fehler gesucht, und es scheint, dass andere Menschen lösen sie durch Verbesserung der Xcode zu 3.1.2. Aber mein Xcode Version ist 3.1.2! Ich es wieder ein paar Mal und immer noch die gleichen Fehler. Vielleicht ist es deshalb, weil ich installiert MacPorts auf dieser vor ein paar Wochen, und es deinstalliert? Vielleicht bin ich nicht für die Installation der "Unix Development-Paket" in der Xcode?
2. Ich habe versucht, um die LDFLAG im Makefile, mit
-read_only_relocs unterdrücken, und ich bin nicht sicher, ob es mich dass es an der richtigen Stelle, und ich weiß nicht, ob das auch gehen. Wie auch immer, wenn ich sie es diesn't Arbeit.
Hat jemand eine Idee? Wenn nicht, kann man versuchen, dass die Gebäude von JM Link und sehen, ob sie das gleiche Problem? Ich bin von Ideen.
Vielen Dank.