How can i use webports to make gumbo-parser with a shared library(libgumbo.so).

79 views
Skip to first unread message

firebird

unread,
Apr 15, 2017, 12:15:29 PM4/15/17
to Native-Client-Discuss
Hi,
recently, i have to work with gumbo-parser in c++. but gumbo-parser is a pure c99 tool. so i use gumbo-query which is base on gumbo-parser can be used in c++ easily.
but, the problem is, when i'm trying to make gumbo-query with webports, that requires gumbo-parser's shared library named libgumbo.so.
  1. make gumbo-parser. Some files generate in target directory as below,
    directory "src/ports/gumbo-parser" filelist:
    file1: build
    .sh
    ############build.sh BOF#################
    BUILD_DIR=${SRC_DIR}
    AutogenStep() {
      # Remove \r\n from the shell script.
      # The default sed on Mac is broken. Work around it by using $'...' to have
      # bash convert \r to a carriage return.
      ./autogen.sh
      # install-sh is extracted without the execute bit set; for some reason this
      # works OK on Linux, but fails on Mac.
      #PatchConfigure
      #PatchConfigSub
    }

    ConfigureStep() {
      ChangeDir ${SRC_DIR}
      AutogenStep
      DefaultConfigureStep
    }

    ############build.sh EOF#################

    file2: pkg_info
    ############pkg_info BOF#################
    NAME=gumbo-parser
    VERSION=0.10.1
    LICENSE=GPL
    SHA1=55dd0b76094eeda1e93fe9fd0939b86936bbdca6
    DISABLED_TOOLCHAIN=(emscripten)
    ############pkg_info EOF#################



    ~/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/include/gumbo.h
    ~/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/include/tag_enum.h
    ~/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/lib/libgumbo.a
    ~/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/lib/libgumbo.la

    expect one new file named
    libgumbo.so

  2. make gumbo-query. there is an error when i trying to make it.The error message shows the Gumbo_LIBRARY not found,it means that the gumbo-parser shared library not found.
    Relevant CMake configuration variables:

        Gumbo_INCLUDE_DIR=/home/henryzhu/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/include
        Gumbo_LIBRARY=<not found>
        Gumbo_static_LIBRARY=/home/henryzhu/workspace/nacl_sdk/pepper_49/toolchain/linux_pnacl/le32-nacl/usr/lib/libgumbo.a

      You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
      CMakeCache.txt to discard all values and force full re-detection if
      necessary.

    Call Stack (most recent call first):
      cmake/FindGumbo.cmake:39 (libfind_process)
      CMakeLists.txt:20 (find_package)

How can i use webports to make gumbo-parser with a shared library(libgumbo.so).

Derek Schuff

unread,
Apr 17, 2017, 11:35:27 AM4/17/17
to Native-Client-Discuss
If you are using PNaCl (which it looks like you are) then you can't make a shared library because PNaCl does not support shared libraries. You'll have to use the static library (libgumbo.a).

--
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.

朱小江

unread,
Apr 18, 2017, 8:16:18 AM4/18/17
to native-cli...@googlegroups.com
Thanks for you reply.
Is there any way that i can change the make arguments to use static library instead of shared library.

To unsubscribe from this group and stop receiving emails from it, send an email to native-client-discuss+unsub...@googlegroups.com.
To post to this group, send email to native-client-discuss@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/native-client-discuss/Sj64eM4Lylg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to native-client-discuss+unsub...@googlegroups.com.
To post to this group, send email to native-client-discuss@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages