hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-7879) hdfs.dll does not export functions of the public libhdfs API.
Date Tue, 03 Mar 2015 22:51:04 GMT

     [ https://issues.apache.org/jira/browse/HDFS-7879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Nauroth updated HDFS-7879:
--------------------------------
    Attachment: HDFS-7879.001.patch

This patch fixes the issue as follows.
# In CMakeLists.txt, when running on Windows, do not override the static library's name to
"hdfs".  This will cause the build output to be hdfs_static.lib for the statically linked
library and hdfs.lib for the DLL import library.  Define symbol {{LIBHDFS_DLL_EXPORT}}, which
is used in hdfs.h.
# In hdfs.h, use a macro to tag all public API functions with {{\_\_declspec(dllexport)}}
or {{\_\_declspec(dllimport)}} (or nothing at all if the client application is using static
linking).  This is a standard idiom documented here, and I've also seen it used in the lzo
library for example.
https://msdn.microsoft.com/en-us/library/8fskxacy.aspx

Linux builds are not altered by this patch.

> hdfs.dll does not export functions of the public libhdfs API.
> -------------------------------------------------------------
>
>                 Key: HDFS-7879
>                 URL: https://issues.apache.org/jira/browse/HDFS-7879
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: build, libhdfs
>    Affects Versions: 2.6.0
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-7879.001.patch
>
>
> HDFS-573 enabled libhdfs to be built for Windows.  This did not include marking the public
API functions for export in hdfs.dll though, effectively making dynamic linking scenarios
impossible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message