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

Makefile.pdlibbuilder ignores PDBINDIR #48

Closed
harvv opened this Issue Jan 17, 2019 · 4 comments

Comments

Projects
None yet
5 participants
@harvv
Copy link

harvv commented Jan 17, 2019

When having PD installed in none of the Windows "obvious" places (e.g. Program Files or %AppData%...etc), the Makefile's script seems to ignore the user-specified PDBINDIR when it creates the linker line that pulls in pd.dll. From the Makefile (Makefile.pdlibbuilder):

"shared.ldflags = -static-libgcc -shared "$(pdbinpath)/pd.dll"

...where it uses the 'pdbinpath' var instead...which is earlier detected with this:
"

ifeq ($(system), Windows)
pkglibdir := $(APPDATA)/Pd
ifndef pdbinpath
pdbinpath := $(shell ls -d "$(PROGRAMFILES)/pd/bin")
endif
ifndef pdincludepath
pdincludepath := $(shell ls -d "$(PROGRAMFILES)/pd/src")
endif
endif
"

...which apparently takes no regard to what PDBINDIR has specified.

RESULT: the linker tries to use "/pd.dll" (since it obviously didn't find my pd's "bin" dir in any of the obvious places) and fails

WORKAROUND/HACK:
towards the top of the Makefile.pdlibbuilder, hardcode like so:
pdbinpath = $(PDBINDIR)

(This is obviously bad but it shows that this is in fact the problem, as the linking will succeed with this modification)
(For reference, my Pure Data is installed in "c:\standalone_apps\pd-0.49-0")

@danomatika

This comment has been minimized.

Copy link
Contributor

danomatika commented Jan 17, 2019

This seems like an issue for the pdlibbuilder repo: https://github.com/pure-data/pd-lib-builder

@umlaeute umlaeute transferred this issue from pure-data/externals-howto Jan 17, 2019

@Lucarda

This comment has been minimized.

Copy link

Lucarda commented Jan 17, 2019

@harvv
Use the correct :
make PDDIR=c:\standalone_apps\pd-0.49-0 install

PDDIR is what you are looking for.

@Lucarda

This comment has been minimized.

Copy link

Lucarda commented Jan 18, 2019

@harvv

pd-lib-builder is prepared to handle non-standard Pd installations so you don't have to hack anything.

By suppling PDDIR=c:/pd in the make command p-l-b will look for files in c:/pd/bin (pd.dll) and in c:/pd/src (m_pd.h, etc).

@katjav

This comment has been minimized.

Copy link
Contributor

katjav commented Jan 18, 2019

The bug reported here is valid, but hopefully not for current pdlibbuilder (0.5.1). From the changelog:

v0.5.1, dated 2018-03-15
Fixes and improvements for Windows builds:

  • properly evaluate variables 'PDDIR' and 'PDBINDIR' to find pd.dll
  • define default path of 32 bit Pd on 64 bit Windows
  • link C++ externals with standard C libs on Windows, they don't load otherwise
  • strip installed Windows binaries by default
    (issues #34, #39, #41, #42 respectively)
    Warning for all platforms: variable 'PD_PATH' is no longer supported, use the
    equivalent 'PDDIR'.

@umlaeute umlaeute closed this Jan 18, 2019

umlaeute added a commit to pure-data/externals-howto that referenced this issue Jan 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment