get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/85455/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 85455,
    "url": "https://patches.dpdk.org/api/patches/85455/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201218131422.15131-1-olivier.matz@6wind.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20201218131422.15131-1-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201218131422.15131-1-olivier.matz@6wind.com",
    "date": "2020-12-18T13:14:22",
    "name": "[v3] build: fix plugin load on static builds",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0bf2761bd36f485c54569b82611f2ad0e7518df4",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201218131422.15131-1-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 14373,
            "url": "https://patches.dpdk.org/api/series/14373/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14373",
            "date": "2020-12-18T13:14:22",
            "name": "[v3] build: fix plugin load on static builds",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/14373/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/85455/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/85455/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B1730A09FD;\n\tFri, 18 Dec 2020 14:15:08 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0AC0CCADE;\n\tFri, 18 Dec 2020 14:14:44 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id B3C72CAD2;\n Fri, 18 Dec 2020 14:14:41 +0100 (CET)",
            "from glumotte.dev.6wind.com. (unknown [10.16.0.195])\n by proxy.6wind.com (Postfix) with ESMTP id 80E884AC36A;\n Fri, 18 Dec 2020 14:14:41 +0100 (CET)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, harry.van.haaren@intel.com,\n keith.wiles@intel.com, luca.boccassi@gmail.com, olivier.matz@6wind.com,\n stable@dpdk.org, thomas@monjalon.net",
        "Date": "Fri, 18 Dec 2020 14:14:22 +0100",
        "Message-Id": "<20201218131422.15131-1-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20201126142042.24741-1-olivier.matz@6wind.com>",
        "References": "<20201126142042.24741-1-olivier.matz@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3] build: fix plugin load on static builds",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When dpdk is compiled as static libraries, it is not possible\nto load a plugin from an application. We get the following error:\n\n  EAL: librte_pmd_xxxx.so: undefined symbol: per_lcore__rte_errno\n\nThis happens because the dpdk symbols are not exported. Add them to the\ndynamic symbol table by using '-Wl,--export-dynamic'. This option was\npreviously present when compiled with Makefiles, it was introduced in\ncommit f9a08f650211 (\"eal: add support for shared object drivers\")\n\nAlso add it to the pkg-config file.\n\nFixes: 16ade738fd0d (\"app/testpmd: build with meson\")\nFixes: 89f0711f9ddf (\"examples: build some samples with meson\")\nCc: stable@dpdk.org\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n\nv2\n* only set examples/applications flags if build is static\n\nv3\n* add missing pkg-config part in previous version\n\n app/meson.build                   | 6 ++++++\n buildtools/pkg-config/meson.build | 2 +-\n examples/meson.build              | 7 ++++++-\n 3 files changed, 13 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/meson.build b/app/meson.build\nindex eb74f215a3..fd72d7da68 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -25,6 +25,10 @@ apps = [\n lib_execinfo = cc.find_library('execinfo', required: false)\n \n default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']\n+default_ldflags = []\n+if get_option('default_library') == 'static'\n+\tdefault_ldflags += ['-Wl,--export-dynamic']\n+endif\n \n foreach app:apps\n \tbuild = true\n@@ -32,6 +36,7 @@ foreach app:apps\n \tsources = []\n \tincludes = []\n \tcflags = default_cflags\n+\tldflags = default_ldflags\n \tobjs = [] # other object files to link against, used e.g. for\n \t          # instruction-set optimized versions of code\n \n@@ -58,6 +63,7 @@ foreach app:apps\n \t\texecutable('dpdk-' + name,\n \t\t\t\tsources,\n \t\t\t\tc_args: cflags,\n+\t\t\t\tlink_args: ldflags,\n \t\t\t\tlink_whole: link_libs,\n \t\t\t\tdependencies: dep_objs,\n \t\t\t\tinstall_rpath: join_paths(get_option('prefix'),\ndiff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build\nindex 5f19304289..168ee08e58 100644\n--- a/buildtools/pkg-config/meson.build\n+++ b/buildtools/pkg-config/meson.build\n@@ -47,7 +47,7 @@ This is required for a number of static inline functions in the public headers.'\n \t                  # if libbsd is not enabled, then this is blank\n \tlibraries_private: ['-Wl,--whole-archive'] +\n \t\t\tdpdk_drivers + dpdk_static_libraries +\n-\t\t\t['-Wl,--no-whole-archive']\n+\t\t\t['-Wl,--no-whole-archive', '-Wl,--export-dynamic']\n )\n \n # For static linking with dependencies as shared libraries,\ndiff --git a/examples/meson.build b/examples/meson.build\nindex 46ec80919e..f643ec1bad 100644\n--- a/examples/meson.build\n+++ b/examples/meson.build\n@@ -63,6 +63,10 @@ default_cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n+default_ldflags = dpdk_extra_ldflags\n+if get_option('default_library') == 'static'\n+\tdefault_ldflags += ['-Wl,--export-dynamic']\n+endif\n \n foreach example: examples\n \tname = example.split('/')[-1]\n@@ -70,6 +74,7 @@ foreach example: examples\n \tsources = []\n \tallow_experimental_apis = false\n \tcflags = default_cflags\n+\tldflags = default_ldflags\n \n \text_deps = [execinfo]\n \tincludes = [include_directories(example)]\n@@ -91,7 +96,7 @@ foreach example: examples\n \t\texecutable('dpdk-' + name, sources,\n \t\t\tinclude_directories: includes,\n \t\t\tlink_whole: link_whole_libs,\n-\t\t\tlink_args: dpdk_extra_ldflags,\n+\t\t\tlink_args: ldflags,\n \t\t\tc_args: cflags,\n \t\t\tdependencies: dep_objs)\n \telif not allow_skips\n",
    "prefixes": [
        "v3"
    ]
}