The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > OS X (Apple)
.
google unix.com



OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem on install csaunders SUN Solaris 1 12-17-2008 02:53 PM
The problem after install gcc on AIX 5.3 zither AIX 1 01-02-2008 12:44 AM
suse 9.0 problem video 3bumbs plumming UNIX for Dummies Questions & Answers 6 12-02-2003 07:20 PM
Laptop video problem.... MadProfessor UNIX for Dummies Questions & Answers 4 12-01-2003 07:21 PM
Just a video problem Z0mby UNIX for Dummies Questions & Answers 1 01-14-2002 12:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2009
Dorna Dorna is offline
Registered User
  
 

Join Date: May 2009
Posts: 6
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 (permalink)  
Old 05-21-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,655
Quote:
Originally Posted by Dorna View Post
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 (permalink)  
Old 05-21-2009
Dorna Dorna is offline
Registered User
  
 

Join Date: May 2009
Posts: 6
I tried, but I don't know if I did it right. Where am I supposed to add that option?
Sponsored Links
Closed Thread

Bookmarks

Tags
264 encoder, jm encoder, ld flags, os x, xcode

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0