danapsimer / drupal2hugo

Convert a Drupal site to hugo.
MIT License
37 stars 14 forks source link

Can't install drupal2hugo #7

Open ccamara opened 6 years ago

ccamara commented 6 years ago

Disclaimer: I am completely new to go and compiling

When following instructions on readme file on how to compile drupal2hugo I got the following error:

$ go get github.com/fale/drupal2hugo
# github.com/fale/drupal2hugo/model
go/src/github.com/fale/drupal2hugo/model/db.go:74:16: not enough arguments in call to DbMap.TraceOn
        have (string, *log.Logger)
        want (string, string, gorp.GorpLogger)

I am using ubuntu 16.04 and I have installed go 1.9.2 following the instructions provided on this link

dravenk commented 6 years ago

+1

dravenk commented 6 years ago

Try to fix in /model/db.go.

change

DbMap.TraceOn("", log.New(dbTraceWriter, "gorptest: ", log.Lmicroseconds))

to

DbMap.TraceOn("","", log.New(dbTraceWriter, "gorptest: ", log.Lmicroseconds))
ccamara commented 6 years ago

@DravenK since your commit is not yet merged to this branch, do you know how can I use your forked repo instead? I tried with go get github.com/DravenK/drupal2hugo but I got the same error:


$ go get github.com/DravenK/drupal2hugo
# github.com/fale/drupal2hugo/model
go/src/github.com/fale/drupal2hugo/model/db.go:74:16: not enough arguments in call to DbMap.TraceOn
        have (string, *log.Logger)
        want (string, string, gorp.GorpLogger)
dravenk commented 6 years ago

@ccamara I'm not sure. Maybe the dependencies are not fully downloaded. I couldn't replicate the bug. This is the full log:

dravenk:~ longxianwen$ ls go/bin/
dravenk:~ longxianwen$ go get github.com/DravenK/drupal2hugo
dravenk:~ longxianwen$ ls go/bin/
drupal2hugo
dravenk:~ longxianwen$ drupal2hugo 
Usage of drupal2hugo:
  -V    Version information
  -db string
        Drupal database name - required
  -driver string
        SQL driver (default "mysql")
  -emvideoField string
        name of CCK field that holds emvideo data.
  -host string
        Mysql host (default "localhost")
  -pass string
        Drupal password (you will be prompted for the password if this is absent)
  -prefix string
        Drupal table prefix (default "drp_")
  -user string
        Drupal user (defaults to be the same as the Drupal database name)
  -v    Verbose
dravenk:~ longxianwen$ 
dravenk commented 6 years ago

@ccamara Can you please provide the detail environment information. Perhaps this will help project authors replicate the situation. Just run go env and copy into here.

ccamara commented 6 years ago

Sure! I am using kubuntu 16.04 and that's the output you requested:

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/carlinux/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build915823556=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
luxpir commented 6 years ago

For anyone else in @ccamara 's position, try making dravenk's edit in the /fale file too:

go/src/github.com/fale/drupal2hugo/model/db.go

Worked here - presuming you'd already tried to 'go get' fale's repo.