Closed jmzaleski closed 4 years ago
Matthew,
Thanks for your question. You have run into a problem I created while moving to a git distribution of the source. Since it is an imake based build system, I put all the Makefile’s into .gitignore. But you need an initial top-level Makefile to bootstrap (so it can do “make CPU”).
My inelegant work-around (that will need better documentation) is to add a Makefile.orig to the repository, then for now you have to manually copy it to Makefile before running configure.
So I’ve pushed this Makefile.orig. I hope this works. I will look at hacking the configure script to automate this.
Scott Johnston
On Feb 8, 2016, at 4:22 PM, Mathew Zaleski notifications@github.com wrote:
I just tried to configure a new clone of ivtools-1.2 on a linuxmint 17.3
Linux matz-vbox-64-moz 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
The configure complains:
writing constants to be pulled in by each Makefile from config/config.mk: writing "XCONFIGDIR = /usr/lib/X11/X11/config" writing "ABSTOP = /home/matz/git/ivtools-1.2" make: * No rule to make target `CPU'. Stop. writing "CPU = " make: * No rule to make target`CPU'. Stop. writing "LIBSTDCPLUSPLUS2 = 0" writing "LIBSTDCPLUSPLUS3 = 1" now do a "make"
but no Makefile was created.
Sorry, for the dumb question, but when ./configure --help | grep -i cpu returns nothing, I don't know what to do next.
— Reply to this email directly or view it on GitHub https://github.com/vectaport/ivtools-1.2/issues/3.
I did ln -s Makefile.orig Makefile ./configure make
This got a lot further, but when I went and looked for specific a.out's there weren't any. For instance, src/dclock/LINUX failed to make due a few symbols in libXext So, just hacking around, I added -L/usr/lib/x86_64-linux-gnu to the link command line and success.. More hints? Sounds like a configure option to me (?)
—x-libraries=path and —x-includes=path should help. See ./configure —help for more options.
Scott
On Feb 8, 2016, at 7:25 PM, Mathew Zaleski notifications@github.com wrote:
I did ln -s Makefile.orig Makefile ./configure make
This got a lot further, but when I went and looked for specific a.out's there weren't any. For instance, src/dclock/LINUX failed to make due a few symbols in libXext So, just hacking around, I added -L/usr/lib/x86_64-linux-gnu to the link command line and success.. More hints? Sounds like a configure option to me (?)
— Reply to this email directly or view it on GitHub https://github.com/vectaport/ivtools-1.2/issues/3#issuecomment-181689109.
Does the autotools-based system that ditches imake, in my fork of the repo, work for you?
yes, the makefiles generated by configure work, at least as far as the link edit. (tell the truth I had forgotten all about imake. long time since fooling with IV)
I don't think --x-libraries path is my issue --- I see rules in the configure script checking if x programs will link without further -L options.
Rather, I think it's something to do with the goofy place linuxmint/ubunto put libXext.so.
I can't see anything in the configure script to add an extra -L (..but i bet it's there somewhere..)
As usual, configure and friends have defeated me. I went on a campaign to make dclock work. In the generated Makefile in ivtools-1.2/src/dclock/LINUX/Makefile I found a macro called XLIBDIR. It's undefined (I verified this by adding echo $(XLIBDIR))
So, I defined it like so:
XLIBDIR = -L/usr/lib/x86_64-linux-gnu
(I know this will be overwritten, but I did it for experimentation's sake)
sure enough, now the link errors complaining about symbols from libXext go away.
What's more, if I do
env LD_LIBRARY_PATH=$HOME/git/ivtools-1.2/src/IV/LINUX ./a.out
it runs!
However, trying to figure out how to get the configure program to set XLIBDIR is beyond me.
So "./configure —x-libraries=libpath” didn’t work for you? Followed by a make clean for safety before a make?
Scott
On Feb 9, 2016, at 2:06 PM, Mathew Zaleski notifications@github.com wrote:
As usual, configure and friends have defeated me. I went on a campaign to make dclock work. In the generated Makefile in ivtools-1.2/src/dclock/LINUX/Makefile I found a macro called XLIBDIR. It's undefined (I verified this by adding echo $(XLIBDIR))
So, I defined it like so: XLIBDIR = -L/usr/lib/x86_64-linux-gnu
(I know this will be overwritten, but I did it for experimentation's sake) sure enough, now the link errors complaining about symbols from libXext go away. What's more, if I do env LD_LIBRARY_PATH=$HOME/git/ivtools-1.2/src/IV/LINUX ./a.out
it runs!
However, trying to figure out how to get the configure program to set XLIBDIR is beyond me.
— Reply to this email directly or view it on GitHub https://github.com/vectaport/ivtools-1.2/issues/3#issuecomment-182099138.
ugh. sorry. i must have made a mistake when it tried it earlier. I tried again like so:
./configure --x-libraries=/usr/lib/x86_64-linux-gnu
make
env LD_LIBRARY_PATH=$HOME/git/ivtools-1.2/src/IV/LINUX ./src/dclock/LINUX/a.out
works!
Okay, so --x-libraries=/usr/lib/x86_64-linux-gnu works.. but shouldn't configure tell us it's missing essential stuff??
So, I stared at configure for a while. No surprise, I've very confused about what it's doing in its attempts to configure X. If one of you wants to give me a hint (or two) I'll try and figure out how to fix this so configure does something more helpful, like report that it doesn't know where the X libs and what to do. Well, any suggestions would be appreciated. Following are my notes as I wandered about trying to figure out what was going one.
configure, around line 3556 does:
cat >Imakefile <<'_ACEOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
_ACEOF
#following generates Makefile from Imakefile
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
#following evaluates ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
#and now we know what xmkmf had in mind for us
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
#now it looks for $(USRLIBDIR)/libX11.so (etc)
for ac_extension in a so sl; do
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
test -f $ac_im_libdir/libX11.$ac_extension; then
ac_im_usrlibdir=$ac_im_libdir; echo ac_im_usrlibdir $ac_im_usrlibdir; break
fi
done
##and never finds any of these.. isn't this a problem?? so it continues using the values it got from
## the generated makefile. and hence my link edit fails because that's not where the X libs actually are.
The way the configure script reports the missing X library directory is when it prints out XCONFIGDIR at the end. If this is empty you’ve got a problem. That script could be modified to detect an empty X library variable and suggest using —x-libraries.
I have never quite figured out how to extend the search list for X library directory (the X includes directory is a pretty obvious table within the script).
Scott
On Feb 11, 2016, at 1:17 PM, Mathew Zaleski notifications@github.com wrote:
Okay, so --x-libraries=/usr/lib/x86_64-linux-gnu works.. but shouldn't configure tell us it's missing essential stuff??
So, I stared at configure for a while. No surprise, I've very confused about what it's doing in its attempts to configure X. If one of you wants to give me a hint (or two) I'll try and figure out how to fix this so configure does something more helpful, like report that it doesn't know where the X libs and what to do. Well, any suggestions would be appreciated. Following are my notes as I wandered about trying to figure out what was going one.
configure, around line 3556 does:
cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF
following generates Makefile from Imakefile
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
following evaluates ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
and now we know what xmkmf had in mind for us
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
now it looks for $(USRLIBDIR)/libX11.so (etc)
for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; echo ac_im_usrlibdir $ac_im_usrlibdir; break fi done
and never finds any of these.. isn't this a problem?? so it continues using the values it got from
the generated makefile. and hence my link edit fails because that's not where the X libs actually are.
— Reply to this email directly or view it on GitHub https://github.com/vectaport/ivtools-1.2/issues/3#issuecomment-183063010.
To summarize there are 3 common problems with using the configure script and imake to build ivtools from source:
1) configure script cannot find X libraries -- solution is to provide --x-libraries argument
2) make CPU
doesn't come up with the right CPU value to name the directories that object code and binaries are in -- solution is to set CPU environment variable yourself, either DARWIN for MacOS or LINUX for everything else nowadays.
3) there is no top-level Makefile if built from clone GitHub -- solution is to manually copy Makefile.orig to Makefile before doing the first make after running configure.
I just tried to configure a new clone of ivtools-1.2 on a linuxmint 17.3
Linux matz-vbox-64-moz 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
The configure complains:
now do a "make"
but no Makefile was created.
Sorry, for the dumb question, but when ./configure --help | grep -i cpu returns nothing, I don't know what to do next.