Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build shared library on cygwin #20

Merged
merged 1 commit into from
Aug 4, 2023
Merged

Build shared library on cygwin #20

merged 1 commit into from
Aug 4, 2023

Conversation

fd00
Copy link

@fd00 fd00 commented Aug 4, 2023

$ uname -srvmpio
CYGWIN_NT-10.0-22000 3.5.0-0.367.gc49bc478b4a7.x86_64 2023-08-02 15:46 UTC x86_64 unknown unknown Cygwin
$ cd /usr/src
$ git clone https://github.com/OpenIDC/cjose.git
$ cd cjose
$ ./configure --enable-shared --disable-static
$ make
: 
/bin/sh ../libtool  --tag=CC   --mode=link gcc -std=gnu99 --pedantic -Wall -Werror -g -O2 -I../include -g -O2 -lm  -o libcjose.la -rpath /usr/local/lib libcjose_la-version.lo libcjose_la-util.lo libcjose_la-base64.lo libcjose_la-concatkdf.lo libcjose_la-jwk.lo libcjose_la-jwe.lo libcjose_la-jws.lo libcjose_la-header.lo libcjose_la-error.lo  -ljansson -lcrypto
libtool:   error: can't build x86_64-pc-cygwin shared library unless -no-undefined is specified

Due to Windows platform limitations, this option is required when building shared libraries.
Without this option, only static libraries can be built.

https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html

This option should be used if the package has been ported to build clean dlls on win32 platforms. Usually this means that any library data items are exported with __declspec(dllexport) and imported with __declspec(dllimport). If this option is not used, libtool will assume that the package libraries are not dll clean and will build only static libraries on win32 hosts.

Provision must be made to pass -no-undefined to libtool in link mode from the package Makefile. Naturally, if you pass -no-undefined, you must ensure that all the library symbols really are defined at link time!

@zandbelt zandbelt merged commit 4f67fba into OpenIDC:version-0.6.2.x Aug 4, 2023
7 checks passed
zandbelt added a commit that referenced this pull request Aug 4, 2023
@fd00 fd00 deleted the cygwin branch August 5, 2023 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants