Skip to content

Commit

Permalink
Merge pull request #678 from HolyWu/patch
Browse files Browse the repository at this point in the history
Pass undefined flag to the linker since libtool doesn't do it
  • Loading branch information
myrsloik committed Apr 28, 2021
2 parents 0807003 + ae34d62 commit 6b182f7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 32 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/linux.yml
Expand Up @@ -15,14 +15,14 @@ jobs:

- name: Install zimg
run: |
git clone https://github.com/sekrit-twc/zimg --branch v3.0 --depth 1 ./zimg
pushd ./zimg
git clone https://github.com/sekrit-twc/zimg --branch v3.0 --depth 1
pushd zimg
./autogen.sh
./configure --prefix=/usr/
./configure --prefix=/usr
make -j2
sudo make install -j2
popd
rm -rf ./zimg
rm -rf zimg
- name: Setup Python
uses: actions/setup-python@v2
Expand All @@ -35,17 +35,13 @@ jobs:
python -m pip install --upgrade pip
pip install cython
- name: Set neccessary environment variables
run: |
PYTHON_BASE_PATH=$(command -v python | xargs dirname)/..
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PYTHON_BASE_PATH/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=$LIBRARY_PATH:$PYTHON_BASE_PATH/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PYTHON_BASE_PATH/lib/pkgconfig" >> $GITHUB_ENV
- name: Set PKG_CONFIG_PATH
run: echo "PKG_CONFIG_PATH=$pythonLocation/lib/pkgconfig" >> $GITHUB_ENV

- name: configure
run: |
./autogen.sh
./configure --prefix=/usr/
./configure --prefix=/usr
- name: make
run: make -j2
Expand All @@ -56,4 +52,4 @@ jobs:
pip install .
- name: Run test
run: python -m unittest discover -s ./test/
run: python -m unittest discover -s test
28 changes: 12 additions & 16 deletions .github/workflows/macos.yml
Expand Up @@ -17,21 +17,21 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install automake and pkg-config
- name: Install automake
run: |
brew update
brew install automake
brew install pkg-config
- name: Install zimg
run: |
git clone https://github.com/sekrit-twc/zimg --branch v3.0 --depth 1 ./zimg
pushd ./zimg
git clone https://github.com/sekrit-twc/zimg --branch v3.0 --depth 1
pushd zimg
./autogen.sh
./configure
make -j2
sudo make install -j2
make -j3
sudo make install -j3
popd
rm -rf ./zimg
rm -rf zimg
- name: Setup Python
uses: actions/setup-python@v2
Expand All @@ -44,25 +44,21 @@ jobs:
python -m pip install --upgrade pip
pip install cython
- name: Set neccessary environment variables
run: |
PYTHON_BASE_PATH=$(command -v python | xargs dirname)/..
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PYTHON_BASE_PATH/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=$LIBRARY_PATH:$PYTHON_BASE_PATH/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PYTHON_BASE_PATH/lib/pkgconfig" >> $GITHUB_ENV
- name: Set PKG_CONFIG_PATH
run: echo "PKG_CONFIG_PATH=$pythonLocation/lib/pkgconfig" >> $GITHUB_ENV

- name: configure
run: |
./autogen.sh
./configure
- name: make
run: make -j2
run: make -j3

- name: make install
run: |
sudo make install -j2
sudo make install -j3
pip install .
- name: Run test
run: python -m unittest discover -s ./test/
run: python -m unittest discover -s test
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Expand Up @@ -73,4 +73,4 @@ jobs:
popd
- name: Run test
run: python -m unittest discover -s test/
run: python -m unittest discover -s test
6 changes: 3 additions & 3 deletions Makefile.am
Expand Up @@ -79,7 +79,7 @@ pkginclude_HEADERS = include/VapourSynth.h \

pkgconfig_DATA += pc/vapoursynth.pc

libvapoursynth_la_LDFLAGS = -no-undefined -avoid-version
libvapoursynth_la_LDFLAGS = -no-undefined -avoid-version $(UNDEFINEDLDFLAGS)
libvapoursynth_la_CPPFLAGS = $(ZIMG_CFLAGS) -DVS_PATH_PLUGINDIR='"$(PLUGINDIR)"'
libvapoursynth_la_LIBADD = $(ZIMG_LIBS) $(DLOPENLIB) libexprfilter.la

Expand Down Expand Up @@ -126,7 +126,7 @@ lib_LTLIBRARIES += libvapoursynth-script.la
pkgconfig_DATA += pc/vapoursynth-script.pc

libvapoursynth_script_la_SOURCES = src/vsscript/vsscript.cpp
libvapoursynth_script_la_LDFLAGS = -no-undefined -version-info 0
libvapoursynth_script_la_LDFLAGS = -no-undefined -version-info 0 $(UNDEFINEDLDFLAGS)
libvapoursynth_script_la_CPPFLAGS = $(PYTHON3_CFLAGS)
libvapoursynth_script_la_LIBADD = $(PYTHON3_LIBS)

Expand All @@ -144,7 +144,7 @@ endif # VSSCRIPT

pkglib_LTLIBRARIES =

commonpluginldflags = -no-undefined -avoid-version $(PLUGINLDFLAGS)
commonpluginldflags = -no-undefined -avoid-version $(PLUGINLDFLAGS) $(UNDEFINEDLDFLAGS)

if SUBTEXT
pkglib_LTLIBRARIES += libsubtext.la
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -72,10 +72,12 @@ AS_CASE(
[darwin*],
[
AC_DEFINE([VS_TARGET_OS_DARWIN])
AC_SUBST([UNDEFINEDLDFLAGS], ["-Wl,-undefined,error"])
],
[*linux*|gnu*|dragonfly*|*bsd*], # The BSDs are close enough, right?
[
AC_DEFINE([VS_TARGET_OS_LINUX])
AC_SUBST([UNDEFINEDLDFLAGS], ["-Wl,--no-undefined"])
],
[cygwin*|mingw*],
[
Expand Down

0 comments on commit 6b182f7

Please sign in to comment.