Can not compile on MacOS, go get is deprecated
I am using 2 Apple Silicon (M3, M4) Macs.
No Rosetta, I prefer not to spoil the quite clean environment with a layer of software, from which I have heard uninstallation is nearly impossible. So I went for local builds.
go had been installed by homebrew.
I could compile both cells and cells-client without any errors on these machines.
Compilation of cells-sync fails:
go get github.com/pydio/cells-sync/...
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
At the moment I am afraid trial and error to get it working by the suggested go install is not a good option.
Please advise.
You should probably bette git clone github.com/pydio/cells-sync, enter the folder and use the make commands here
Good, Thanks!
Could compile successfully.
Details
The instructions for compiling cells-sync state:
- Get the code:
go get github.com/pydio/cells-sync/... - Change directory to
app/ux/ - To load frontend dependencies run
npm install - To compile the frontend, run
npm run build - To pack the frontend inside the binary (not mandatory if you are running on the same machine where
$GOPATHis available), installgithub.com/gobuffalo/packr/packrtool and runmake clean packat the root of the repository.
[ Update 04/16/2020 ] Due to a dependency issue, until we switch to modules or until this dependency master is stable again, you have to apply the following before calling the make command:
cd github.com/zserge/webview
git checkout 9c1b0a888aa40039d501c1ea9f60b22a076a25ea
[ to be continued ]
Compile binary by running make cli
The resulting cells-sync binary should be good to go.
What worked for me to compile on MacOS:
-
brew install go -
brew install npm -
git clone https://github.com/pydio/cells-sync.git -
cd cells-sync -
Change directory to
app/ux/ -
To load frontend dependencies run
npm install
That compiles with many warnings:npm warn deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead npm warn deprecated [email protected]: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained npm warn deprecated [email protected]: [email protected] npm warn deprecated [email protected]: This package has been deprecated and is n ... 13 vulnerabilities (7 moderate, 6 high) ...but NO ERRORs
-
To compile the frontend, run
npm run build> [email protected] build > react-scripts build Creating an optimized production build... Compiled successfully.
Finally compile the cells-sync client:
- Change directory back to the root of the cloned repo
-
make devgo build \ -ldflags "-X github.com/pydio/cells-sync/common.Version=0.9.5-dev" \ -o cells-sync
Verification that the compiled cells-sync can be run:
./cells-sync --help
Cells Sync desktop client.
Realtime, bidirectional synchronization tool for Pydio Cells server.
Launching without command is the same as './cells-sync start' on Mac and Windows.
...
Use autotest for the next verification step:
./cells-sync autotest
2025-01-15T22:42:28.157+0100 INFO Got Stats for fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right {"stats": {"HasChildrenInfo":true,"HasSizeInfo":true,"Size":36,"Folders":0,"Files":0}}
2025-01-15T22:42:28.157+0100 INFO Got Stats for fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left {"stats": {"HasChildrenInfo":true,"HasSizeInfo":true,"Size":47,"Folders":0,"Files":1}}
2025-01-15T22:42:28.157+0100 INFO [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right] Analyzed 2 nodes (100%)
2025-01-15T22:42:28.157+0100 INFO [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left] Analyzed 2 nodes (76%)
Task Status Received: [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right] Analyzed 2 nodes (100%)
Task Status Received: [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left] Analyzed 2 nodes (76%)
2025-01-15T22:42:28.157+0100 INFO [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left] Analyzed 3 nodes (100%)
Task Status Received: [fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left] Analyzed 3 nodes (100%)
2025-01-15T22:42:28.157+0100 INFO Diff Stats {"s": {"EndpointLeft":"fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left","EndpointRight":"fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right","conflicts":1,"missingLeft":0,"missingRight":1}}
2025-01-15T22:42:28.157+0100 INFO Finished analyze : 7 nodes (3 on fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right, 4 on fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left) {"i": 7}
Task Status Received:
Task Status Received:
Task Status Received: Analyzed 7 nodes (3 on fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right, 4 on fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left)
2025-01-15T22:42:28.157+0100 INFO Sending unidirectional patch {"patch": {"Pending":{"Total":1,"UpdateFile":1},"Source":"fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left","Target":"fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right","Type":"TreePatch"}}
2025-01-15T22:42:28.158+0100 INFO Filtering TreePatch took 250ns {"duration": "250ns", "source": "fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left", "target": "fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right"}
Task Status Received: Start processing patch (total bytes 47)
Task Status Received: Transferring file - .pydio - fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right
Task Status Received: Transferring file - basic-file.txt - fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right
Task Status Received: Transferring file - .pydio - fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right
2025-01-15T22:42:28.158+0100 INFO Transferred file {"NodePath": "basic-file.txt", "target": "fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right"}
Task Status Received: Transferred file - basic-file.txt - fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right
2025-01-15T22:42:28.158+0100 INFO Transferred file {"NodePath": ".pydio", "target": "fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right"}
2025-01-15T22:42:28.158+0100 INFO Finishing patch session
Task Status Received: Transferred file - .pydio - fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right
Patch Processing Finished
map[Processed:map[CreateFile:1 Total:2 UpdateFile:1] Source:fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/left Target:fs:///var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0/right Type:TreePatch]
Cleaning resources after test (/var/folders/rc/wg7ywshj00gfj5466bxkv38r0000gp/T/60a89f4e-b836-4c95-a51f-61efde4314f0)
2025-01-15T22:42:28.158+0100 INFO Stop processing patches
Alternative make option, specific for Apple Silicon M_ CPU Macs:
make silicon as last compile step.
I do not know what difference that makes, I just got the idea to do it that way by studying the Makefile.
The binary will be named then cells-sync-m1.