Closed kba closed 4 years ago
I highlighted the problem in the listing with double asterisks.
I don't understand that. Are you saying make install
caused running cp -Lf Makefile /media/kba/ /home/kba/build/github.com/OCR-D/ocrd_all/venv/share/workflow-configuration
(literally)?
vfat and symlinks aside (yes, that would not work), this hints at something going wrong badly. EXISTING_MAKEFILES
is merely a makefile wildcard on the existing .mk files:
https://github.com/bertsky/workflow-configuration/blob/bfce7d3aa31d8e283f28e3898ab73c8463e443c5/Makefile#L385
I fail to see any way this gets expanded to the directory name /media/kba/
...
The point about vfat is this: You don't need symlinks for workflow-configuration
, but if you want to work with the ocrd-make
usage variant (which as opposed to the make
invocation variant needs a prior make install
step), then whereever you want to run ocrd-make
in, the FS will have to support symlinks there. So it's perfectly ok to install from/to vfat, or use ocrd-make
in a target directory with symlink support, or use make
after copying the makefiles yourself (with or without prior make install
) on any FS, but it won't work to run ocrd-make
on vfat.
I highlighted the problem in the listing with double asterisks.
I don't understand that. Are you saying
make install
caused runningcp -Lf Makefile /media/kba/ /home/kba/build/github.com/OCR-D/ocrd_all/venv/share/workflow-configuration
(literally)?
Yes
vfat and symlinks aside (yes, that would not work), this hints at something going wrong badly.
EXISTING_MAKEFILES
is merely a makefile wildcard on the existing .mk files: https://github.com/bertsky/workflow-configuration/blob/bfce7d3aa31d8e283f28e3898ab73c8463e443c5/Makefile#L385I fail to see any way this gets expanded to the directory name
/media/kba/
...
I am as flabberghasted/flummoxed as you are. The symlinks problem is besides the point (and you're right, symlinking FROM vfat should work).
FWIW, this is GNU Make 4.1, is EXISTING_MAKEFILES a builtin there or something similar? What version of make do you test with?
I think i got it. The Problem was that the external HDD had a label VERBATIM HD
with a space. Renamed it to OCRD-HDD
with fatlabel
, remounted and now installation worked.
I think i got it. The Problem was that the external HDD had a label
VERBATIM HD
with a space.
Oh I see! So I should try to support directory names with spaces...
The more we move towards supporting OSX and MS Windows, the more important that will become I guess. IIRC @stweil also struggled with spaces in the past. We should take some time to systematically test this with the full OCR-D stack.
Alas, make is probably never going to support spaces in path names. There simply are no general workarounds either. So this noble goal is futile for workspace-configuration
.
If on OSX/MSW, avoid spaces in path names or don't use makefilization. Should probably make this prominent in the README...
EDIT true for Unix filesystems as well, just less conventional there.
Yeah, the golden rule should be to avoid spaces in general, everywhere. But since the underlying shell normally supports escaped or quoted spaces, there is probably some leeway if we quote right. But without having systematically tested yet, its hard to say.
A notice in the README is probably a good idea in either case.
A notice in the README is probably a good idea in either case.
Done.
Also made ocrd-make
fall back to cp
when ln
does not work. (I know, it's unrelated – but since it came up.)
Yeah, the golden rule should be to avoid spaces in general, everywhere. But since the underlying shell normally supports escaped or quoted spaces, there is probably some leeway if we quote right. But without having systematically tested yet, its hard to say.
The problem is with make
itself. It simply does not know any quoting. It tokenises around spaces in various situations (in fact, most of its functions and automatic variables are centered around white-space delimitation).
I had to offload
ocrd_all
to an external hard drive due to storage running out. I notice that now installation fails:I highlighted the problem in the listing with double asterisks. IIUC this should be the
$(EXSISTING_MAKEFILES)
that are supposed to be symlinks which fails becausevfat
doesn't supporet them I gues..