Video Encoder 264 does not install, problem with LD flags


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Video Encoder 264 does not install, problem with LD flags
# 1  
Old 05-21-2009
Video Encoder 264 does not install, problem with LD flags

Hi all,

I have a big problem. I'm trying to install a 264 video encoder (JM 15.1, from H.264/AVC JM Reference Software Download) on OS X 10.5.5.

First of all I had to disable static compilation, because of this error:
Code:
ld_classic: can't locate file for: -lcrt0.o

I read about this on some forums and disabled static compilation in Makefile and it was solved. Now I get this error:

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

and here's the 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. I found searched for this error and it seems that other people solved it by upgrading the Xcode to 3.1.2. But my Xcode version is 3.1.2!! I reinstalled it a couple of times and still get the same error. Maybe it's because I installed MacPorts on this a few weeks ago, and uninstalled it?? Maybe I'm not supposed to install the "Unix Development package" in the Xcode?

2. I tried to add the LDFLAG in the Makefile, with
-read_only_relocs suppress and I'm not sure it I'm putting it in the right place, and I don't know if that's even supposed to work. Anyway when I add it it diesn't work.

Does anyone have any ideas? If not, can someone try building JM from that link and see if they'll get the same problem? I'm out of ideas.

Many thanks.
# 2  
Old 05-21-2009
Quote:
Originally Posted by Dorna
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

If I was in your situation, I would simply try following the instruction in the error message:

Code:
Use '-read_only_relocs suppress' to enable text relocs

# 3  
Old 05-22-2009
I tried, but I don't know if I did it right. Where am I supposed to add that option?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Hardware

Centos 5.8 video driver problem

i have an older server from about 2001 i was given. i recently lost the OS drive on the system and dicided to go to linux instead of windows. i have tried open suse, centos and both do just about the same thing. they boot fine then they go into installing drivers it hits vidio driver then another... (4 Replies)
Discussion started by: TUX servers
4 Replies

2. Solaris

Newly Compiled GCC 4.4.4 on Solaris sparc gives problem with -m32/-m64 flags

Hello experts, This issue has kept me busy all day long. It started off with openssl compilation which was giving linking error with following message: /usr/local/bin/ld: target elf32-sparc not found collect2: ld returned 1 exit status I tried every step possible thing that I could think... (2 Replies)
Discussion started by: d_shanke
2 Replies

3. UNIX for Dummies Questions & Answers

how to install new java versions to 264 version4.0 alpha

I wrote a java code and compiled it using j2sdk 1.4.2 version. But i have to port those to a unix machine in which a very old version of unix has installed. say unix 264 version4.0 alpha. And the default java version that comes with that unix version is also very old and it is java version... (0 Replies)
Discussion started by: rasa_still_here
0 Replies

4. UNIX for Dummies Questions & Answers

suse 9.0 problem video

i got a NV11 geForce2 100/200 and suse 9.0 pro boot the kernal but then the screen goes blank and nothing else can't install suse 9.0 pro and grabs for this problem x will not come up at all just the boot screen with rez and so on but once i tell it to install thats i have a nec multisync... (6 Replies)
Discussion started by: 3bumbs plumming
6 Replies

5. UNIX for Dummies Questions & Answers

Laptop video problem....

I am running freeBSD on a Digital (company before compaq) laptop, and it is not displaying properly. there is about 2 inches on all sides of the screen that the display doest stretch to, its a little box in the center of the screen, anyone know how i can fix that problem?? any help would be much... (4 Replies)
Discussion started by: MadProfessor
4 Replies

6. UNIX for Dummies Questions & Answers

Just a video problem

Heya, pals! Would someone give me a clue of whatīs happening in here? I have a SiS 6326 video board installed under a FreeBSD 4.2 system, but i canīt figure out whatīs the matter with its configuration. I just canīt connect to Xserver... Setting the configuration with xf86config at the simplest... (1 Reply)
Discussion started by: Z0mby
1 Replies
Login or Register to Ask a Question