webports question

160 views
Skip to first unread message

cesare moschini

unread,
Apr 28, 2016, 7:16:17 AM4/28/16
to Native-Client-Discuss
Hi at all,

it's about a week that I read over the net Native-Client docs, discussions ecc . Unfortunately i'm still a little bit confuse , so I ask help to this group to resolve some doubts.
To reach my goal I want to procede step by step .So , the first purpose is to port ffmpeg in pexe ,execute a simple "ffmpeg -version" command and output the result to a web page.

I follow the instruction of google webports page to port ffmpeg in pnacl. If I build it then the generated ffmpeg.pexe will be ready-to-use in a chrome app without any other configuration?


cesare moschini

unread,
May 3, 2016, 1:33:43 PM5/3/16
to Native-Client-Discuss
Ok , i have ported ffmpeg libs with success.

Then , i tried to modify the getting started tutorial ( part 1 ) to understand if everythng was ok by adding to the hello_tutorial.cc this:

...
virtual void HandleMessage(const pp::Var& var_message) {
    // TODO(sdk_user): 1. Make this function handle the incoming message.
  avcodec_register_all();
  }
...

i also changed the makefile , now it is : 

THIS_MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
NACL_SDK_ROOT ?= $(abspath $(dir $(THIS_MAKEFILE))../..)

# Project Build flags
WARNINGS := -Wno-long-long -Wall -Wswitch-enum -pedantic -Werror
CXXFLAGS := -pthread -std=gnu++98 $(WARNINGS)

#
# Compute tool paths
#
GETOS := python $(NACL_SDK_ROOT)/tools/getos.py
OSHELPERS = python $(NACL_SDK_ROOT)/tools/oshelpers.py
OSNAME := $(shell $(GETOS))
RM := $(OSHELPERS) rm

PNACL_TC_PATH := $(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_pnacl)
PNACL_CXX := $(PNACL_TC_PATH)/bin/pnacl-clang++
PNACL_FINALIZE := $(PNACL_TC_PATH)/bin/pnacl-finalize
CXXFLAGS := -I$(NACL_SDK_ROOT)/include
LDFLAGS := -L$(NACL_SDK_ROOT)/lib/pnacl/Release -lppapi_cpp -lppapi -lavformat -lavcodec -lswscale -lavdevice -lavfilter -lpostproc -lswresample -lavutil -lvpx -lvorbisenc -lvorbis -lmp3lame -ltheora -ltheoraenc -ltheoradec -pthread -lm
#-lm -lpthread -lavformat -lavcodec -lavutil -lavfilter -lvorbis -logg -lmp3lame

#
# Disable DOS PATH warning when using Cygwin based tools Windows
#
CYGWIN ?= nodosfilewarning
export CYGWIN


# Declare the ALL target first, to make the 'all' target the default build
all: hello_tutorial.pexe

clean:
$(RM) hello_tutorial.pexe hello_tutorial.bc

hello_tutorial.bc: hello_tutorial.cc
$(PNACL_CXX) -o $@ $< -O2 $(CXXFLAGS) $(LDFLAGS)

hello_tutorial.pexe: hello_tutorial.bc
$(PNACL_FINALIZE) -o $@ $<


when i compile with pnacl toolchain i receive this error:

$ make

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/bin/pnacl-clang++ -o hello_tutorial.bc hello_tutorial.cc -O2 -I/Users/Ze/Documents/projects/nacl_sdk/pepper_49/include -L/Users/Ze/Documents/projects/nacl_sdk/pepper_49/lib/pnacl/Release -lppapi_cpp -lppapi -lavformat -lavcodec -lswscale -lavdevice -lavfilter -lpostproc -lswresample -lavutil -lvpx -lvorbisenc -lvorbis -lmp3lame -ltheora -ltheoraenc -ltheoradec -pthread -lm

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_write'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_reset'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_writeclear'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_writeinit'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_get_buffer'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libtheora.a: error: undefined reference to 'oggpackB_bytes'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_writetrunc'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_adv'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_look'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_write'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_read'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_readinit'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_bytes'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_get_buffer'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_reset'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_writeclear'

/Users/Ze/Documents/projects/nacl_sdk/pepper_49/toolchain/mac_pnacl/le32-nacl/usr/lib/libvorbis.a: error: undefined reference to 'oggpack_writeinit'

make: *** [hello_tutorial.bc] Error 1


seems a dependency issue , but i have no idea how to resolve. Any advice is welcome.


Thanks!


Victor Khimenko

unread,
May 3, 2016, 4:39:11 PM5/3/16
to Native Client Discuss

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at https://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages