Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

unable to GROUP BY, or ORDER BY on Android -- "open /tmp/ql-tmp-260419420: no such file or directory" #132

Open
abbeydabiri opened this issue Aug 21, 2016 · 13 comments
Assignees

Comments

@abbeydabiri
Copy link

Hi Cznic, thank you very much for this library.

Please correct me if my conclusion is wrong.

After going through the source I believe this bug occurs because the "/tmp/" folder is not present or writable on a lot of Android devices.

As per the comment on line 122 in file github.com/cznic/file.go

TempFile provides a temporary file used for evaluating the GROUP BY, ORDER...

@cznic cznic self-assigned this Aug 21, 2016
@cznic cznic added the bug label Aug 21, 2016
@cznic
Copy link
Owner

cznic commented Aug 23, 2016

Please ping me in two weeks, I am away from a PC.

@abbeydabiri
Copy link
Author

No Problem, I put a temporary fix in my local copy but it is "crude".

Will ping in a couple of weeks

@calmh
Copy link

calmh commented Aug 23, 2016

FWIW, TempFile should work properly when built with GOOS=android.

@abbeydabiri
Copy link
Author

@calmh , Thanks for pitching in.

Unfortunately am not able to build/compile with the flag GOOS=android

I am attempting to create a ".aar" library to be imported into Android Studio.

command used was:
GOOS=android gomobile bind -target=android -o myapp.aar -ldflags "-s -w"

error received was:

gomobile: go install -p=4 -pkgdir=/golang/pkg/gomobile/pkg_android_arm -tags="" -ldflags -s -w gcflags=-shared -ldflags=-shared myapp failed: exit status 2
#myapp
/usr/lib/go-1.6/pkg/tool/linux_amd64/link: -shared and -buildmode=pie are incompatible

@cznic
Copy link
Owner

cznic commented Aug 23, 2016

I have unfortunately never used Go with gomobile. Can you please try with latest stable, ie. go1.7, if, by chance, it gets any farther?

I am disappointed that FileTemp, as @calmh points out, does not adhere to platform specifics (if I understood the comment correctly).

@calmh
Copy link

calmh commented Aug 23, 2016

No, it does, it's just that Android is not Linux, does not have a /tmp, and requires GOOS=android building. How to do that successfully I don't know, it's just that I ran into the same temp file issue on another project.

@cznic
Copy link
Owner

cznic commented Sep 5, 2016

I'm back.

@rasabbey I'm not sure what I can do for you. Please let me know about the progress on this, if any.

@abbeydabiri
Copy link
Author

@cznic welcome back,

I only put a temporary fix to check if an sdcard exists and use that instead.
it is a crude fix, mainly because am working on other aspects of the application and
hoping to get back to the db section in about a week and do a better fix.

@cznic
Copy link
Owner

cznic commented Sep 5, 2016

Looking forward your PR 😄

@ghost
Copy link

ghost commented Sep 22, 2016

I also am using this with gomobile to make an aar package.

It's really because an a droid app has no ability to write anywhere.

Elias Naur will probably know the answer I suspect.
I am on mobile and can't find his github handle :)

@cznic cznic mentioned this issue Oct 21, 2016
@dc0d
Copy link

dc0d commented Jan 17, 2018

This is closed. But for some reason it is listed under open issues (GitHub shows it).

@cznic
Copy link
Owner

cznic commented Jan 17, 2018

@dc0d This issue was never closed.

@dc0d
Copy link

dc0d commented Jan 17, 2018

Sorry and Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants