xssnick / TON-Torrent

TON Storage UI
GNU General Public License v2.0
95 stars 6 forks source link

Instructions for building of the project locally #1

Closed IgorShadurin closed 1 year ago

IgorShadurin commented 1 year ago

I tried to built the project locally on mac m1, but got an error. Could you provide the exact steps to build the project? Maybe some additional steps need to be taken before make?

Go version: go version go1.18.10 darwin/arm64 Wails version: v2.5.1

Command: make build-mac

Error

CGO_ENABLED=1 wails build -clean
Wails CLI v2.5.1

# Build Options

Platform(s)        | darwin/arm64                        
Compiler           | /opt/homebrew/opt/go@1.18/bin/go    
Skip Bindings      | false                               
Build Mode         | production                          
Frontend Directory | /Users/test/web/TON-Torrent/frontend
Obfuscated         | false                               
Skip Frontend      | false                               
Compress           | false                               
Package            | true                                
Clean Bin Dir      | true                                
LDFlags            |                                     
Tags               | []                                  
Race Detector      | false                               

# Building target: darwin/arm64

  • Generating bindings: 
  ERROR   
          # github.com/tonutils/torrent-client/oshook
          app_darwin.m:7:5: error: call to undeclared function 'OnLoadFileFromPath'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          app_darwin.m:24:5: error: call to undeclared function 'OnLoadFile'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          app_darwin.m:35:5: error: call to undeclared function 'OnLoadURL'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

          exit status 2

  ERROR   
          # github.com/tonutils/torrent-client/oshook
          app_darwin.m:7:5: error: call to undeclared function 'OnLoadFileFromPath'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          app_darwin.m:24:5: error: call to undeclared function 'OnLoadFile'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          app_darwin.m:35:5: error: call to undeclared function 'OnLoadURL'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

          exit status 2
 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
make: *** [build-mac] Error 1
xssnick commented 1 year ago

Hi, are you building on mac? Looks like compiler excluded file https://github.com/xssnick/TON-Torrent/blob/master/oshook/hook_darwin.go for some reason

IgorShadurin commented 1 year ago

Yeah, on mac. On which system can I build without problems?

xssnick commented 1 year ago

Should be ok on any system, I built it on all systems without problems.

Maybe you could try on windows or linux then

websashka commented 1 year ago

I have same as problem

xssnick commented 1 year ago

Added fix, looks like some compilers require explicit declaration in header on objc side. Pull from master and it should build without problems.