Closed vigneshr6 closed 7 years ago
just as a temporary workaround, try removing data/collection64.go along with data/hash64.go, does the problem disappear afterwards?
I think your solution will switch off 64 bit part.So It will work Is there any permanent solution? Because I have to build my app for Windows 32 bit,64 bit and linux 64 bit,32 bit machines. It is an automated process.
@archey do you by any chance remember why the build constraint mentions ARM? wasn't it intended for working around 32-bit vs 64-bit integers only? https://github.com/HouzuoGuo/tiedot/blob/master/data/collection64.go#L1
The buildconstraints was written so that if it wasnt 64 bit it would error and not build. We added the 32bit code to build on arm and i686 as we were having issues with uint code.
On Feb 28, 2017 2:59 AM, "Howard" notifications@github.com wrote:
@archey https://github.com/archey do you by any chance remember why the build constraint mentions ARM? wasn't it written only for working around 32-bit vs 64-bit integers? https://github.com/HouzuoGuo/tiedot/blob/master/data/collection64.go#L1
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HouzuoGuo/tiedot/issues/126#issuecomment-282969118, or mute the thread https://github.com/notifications/unsubscribe-auth/AAklhko0aU8qYTE0GJq9OctzDYKc7t8Wks5rg9PqgaJpZM4MNBev .
If you don't add !arm as well as !386 to this file it will try to compile this on both 386 and arm, which are both 32bit systems and the code will fail. This constraints allows it to build on x86_64 processors, but it seems to cause issues if they are trying to x-compile 32bit on x86_64.
@archey aren't there 64-bit arm processors too? I suppose those systems won't have trouble with using the 64-bit definitions, is that right?
@HouzuoGuo possibly, but I was under the impression that all arm was 32bit as their is not a 64bit kernel yet. Let me do some more testing locally and see if I can fix the cross-compile issues.
many thanks!
@HouzuoGuo in my testing this fixes the issue. @Vigneshr6 please try to rebuild from the latest git master
Hi @archey , Now it builds 32 bit.But It gives error for 64 bit.
github.com/HouzuoGuo/tiedot/data
F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\collection.go:39: undefined: COL_ FILE_GROWTH F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:38: undefined: HT_FI LE_GROWTH F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:48: undefined: INITI AL_BUCKETS F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:49: undefined: INITI AL_BUCKETS F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:75: undefined: INITI AL_BUCKETS F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:114: undefined: Hash Key F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:125: undefined: Hash Key F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:140: undefined: Hash Key F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:165: undefined: Hash Key F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:188: undefined: INIT IAL_BUCKETS F:\GoPATH\src\github.com\HouzuoGuo\tiedot\data\hashtable.go:188: too many errors
@archey does it make sense to simply use constraint "amd64" in _64 files, and write "!amd64" in _32 files?
@HouzuoGuo I tried that and it fails as well, I'll keep testing this is a pain. My apologies for adding this issue to your code
@archey no worries at all, I was the one who created the trouble initially.
@Vigneshr6 since you have both 32bit and 64bit systems on hand, do you know a proper way to define build constraints so that _32.go files are only compiled on 32bit system, and _64.go files are compiled on 64bit system?
No @HouzuoGuo . I don't have 32 bit machine.After the latest commit.I can build 32 bit binary from 64 bit machine.But I can't build 64 bit binary from that same machine.
FWIW, I get these same issues when doing a go get with go 1.7.4 from a 64bit Debian.
@Vigneshr6 @botherder OK, I am not quite sure how go build constraints work in cross compilation scenario, can anyone of you please educate me on this topic, and hopefully get those build constraints sorted out soonish?
@Vigneshr6 @botherder please try again with the latest master at https://github.com/HouzuoGuo/tiedot/commit/96fa90b5e4620f677d2737bc5358329040942adb
@HouzuoGuo issue solved.Now I can build for win32,win64,linux64 and linux32 from a windows 64bit system. Thanks
thanks for confirmation! @archey how does it look for you? are you builds running fine too?
@HouzuoGuo works fine for me
great, then this issue is resolved.
Hi, When I try to build my app for 32 bit machine from 64 bit machine,I am getting this error
Could u give me a solution for this?