Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

make -C solr start fails on OSX with cp error #33

@kliron

Description

@kliron

Running OSX 10.11.1 (El Capitan). Trying to install transmart-data v1.2.1-SNAPSHOT the installation runs smoothly until I try to start solr with:

make -C solr start

It barfs with the following error:

test -d contrib || /Applications/Xcode.app/Contents/Developer/usr/bin/make contrib
cp --reflink=auto "../lib/postgresql-9.2-1003.jdbc4.jar" "contrib/dataimporthandler/lib/postgresql-9.2-1003.jdbc4.jar"
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: *** [contrib/dataimporthandler/lib/postgresql-9.2-1003.jdbc4.jar] Error 64

The BSD version of cp does not understand long options (like --reflink=auto). To bypass the error we need to use the GNU cp command (gcp is installed as part of coreutils with brew install coreutils for those using Homebrew). Edit vars file and add the lines:

CP_COMMAND=gcp
EXPORT CP_COMMAND

Then edit solr/Makefile replacing line 33 with:

$(CP_COMMAND) --reflink=auto "$<" "$@"

and line 65 with:

$(CP_COMMAND) schemas/schema_$*.xml $@

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions