Comments (6)
How does one build rmapi-0.0.4 on linux using "go"? The only prebuilt release is version 0.0.2 and that does not work for me (it uploads the file as an empty directory)
from rmapi.
I'm on OpenBSD, but the command should work the same on Linux. I use the following to compile a statically-linked binary:
go get -u github.com/juruen/rmapi
go build -ldflags "-linkmode external -extldflags -static" -a github.com/juruen/rmapi
Static linking will result in a larger binary (16.5M vs ~9M on OpenBSD), but on Linux it means that a binary compiled on CentOS 64bit will also work on Ubuntu 64bit, despite those operating systems using different versions of glibc and other libraries. That makes it more portable.
If you don't need it statically-linked, this will yield a smaller binary:
go get -u github.com/juruen/rmapi
go build -a github.com/juruen/rmapi
I hope this helps! (while I'm here, thanks devs for this great project!)
from rmapi.
@curiouslarry I did some digging, and actually you probably don't want to statically link rmapi
against Linux's glibc---glibc has lazy loading of network functions, and the resulting binary isn't actually static, which could result in undefined behaviour and messy nonsense. Hmm. I take back my recommendation if you're using Linux. Sorry for the confusion.
However I was able to compile a static amd64 binary using Linux's musl libc---musl libc is designed for static linking---and tested it against Linuxes as old as CentOS 6.10. If you trust a random person on the Internet to compile code without injecting malicious nonsense into the binary (I didn't, but you shouldn't trust my saying so), I've temporarily uploaded a compiled copy of 0.0.4 to my SDF webspace.
But for personal use, dynamic linking should be fine:
go get -u github.com/juruen/rmapi
go build -a github.com/juruen/rmapi
Procedure to compile a musl libc static binary:
$ # fetch source
$ go get -u github.com/juruen/rmapi
$ # link against musl libc instead of glibc
$ export CC=/usr/bin/musl-gcc
$ # compile
$ go build -ldflags "-linkmode external -extldflags -static" -a github.com/juruen/rmapi
$ # confirm the binary is statically-linked (i.e. no dynamic links)
$ readelf -d ./rmapi
There is no dynamic section in this file.
from rmapi.
Thanks for the help and was able to build. However, whenever I do a "put xx.pdf" it creates a directory rather than a single pdf file. When I do this from my mac osx, everything works fine. Any help would be appreciated.
from rmapi.
I'm unable to reproduce this on Linux. What distro and version of Go are you using?
$ uname -a && go version
Does it still happen with this version? That one works for me (compiled on CentOS 7, run from CentOS 6).
from rmapi.
Closing this as there's a new built package for Linux that has been just released.
from rmapi.
Related Issues (20)
- Can print to RM from Preview; not from Safari HOT 2
- Errors thrown when attempting to use geta HOT 3
- Account for blank pagedata
- Documents tree build fails every time HOT 7
- Is `nuke` really necessary ? HOT 3
- Not working with latest rmfakecloud HOT 2
- How to configure rmapi to access rmfakecloud HOT 1
- Failed to generate annotations for recalendar HOT 1
- mput: option to delete files in the cloud that are not present locally
- one-time code as parameter to binary? HOT 1
- Set font size and other text settings when uploading an epub file
- geta fails ("no uuid pagemap") HOT 1
- Print plugin function not working - macOS Sonoma Public Beta HOT 3
- Is there a similar project to rmapi in nodejs? HOT 1
- Cannot install rmapi
- rmapi stopped working HOT 8
- Put from "outside" rmapi
- Status code 429 on Put
- Accept file extension rmdoc
- Print to Remarkable not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rmapi.