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

PGPLOT_DIR must be set or mystery failures #100

Open
aarchiba opened this issue May 30, 2019 · 0 comments
Open

PGPLOT_DIR must be set or mystery failures #100

aarchiba opened this issue May 30, 2019 · 0 comments

Comments

@aarchiba
Copy link

If PGPLOT_DIR is not set, a bare -I eats -DUSEFFTW and you get a silent miscompilation of fastffts.c and a mystery failure on linking search_bin (missing symbol read_wisdom). On a system with pgplot actually installed, PGPLOT_DIR can be set to anything.

I suggest a change in the Makefile so that if PGPLOT_DIR isn't set the -I and -L don't get added to the command line. Patch follows and appears to work.

diff --git a/src/Makefile b/src/Makefile
index 277c2b0..78b0b4a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -23,10 +23,15 @@ endif
 X11LINK := $(shell pkg-config --libs x11)
 PNGLINK := $(shell pkg-config --libs libpng)
 
-# Include and link information for PGPLOT v5.X (including shared libs!)
-# Typically you need to have your PGPLOT_DIR environment variable set
-PGPLOTINC = -I$(PGPLOT_DIR)
-PGPLOTLINK = -L$(PGPLOT_DIR) -lcpgplot -lpgplot $(X11LINK) $(PNGLINK)
+ifdef PGPLOT_DIR
+       # Include and link information for PGPLOT v5.X (including shared libs!)
+       # Typically you need to have your PGPLOT_DIR environment variable set
+       PGPLOTINC = -I$(PGPLOT_DIR)
+       PGPLOTLINK = -L$(PGPLOT_DIR) -lcpgplot -lpgplot $(X11LINK) $(PNGLINK)
+else
+       PGPLOTINC = 
+       PGPLOTLINK = -lcpgplot -lpgplot $(X11LINK) $(PNGLINK)
+endif
 
 # Include and link information for the FFTW 3.X single-precision library
 FFTINC := $(shell pkg-config --cflags fftw3f)
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

No branches or pull requests

1 participant