cli icon indicating copy to clipboard operation
cli copied to clipboard

Advice On Upgrading Project from Starport to Ignite

Open lava17 opened this issue 3 years ago • 3 comments

Hi there, first of all thanks for an amazing technology! Currently working on a project which uses starport 0.19.2 and working fine.. my next mission is to upgrade our project to latest ignite version

✗ starport version       
Starport version:       v0.19.2
Starport build date:    2022-01-19T11:16:41Z
Starport source hash:   -
Your OS:                linux
Your arch:              amd64
Your go version:        go version go1.18.2 linux/amd64

also have ignite (should probably update to 0.21.2)

✗ ignite version                                

Ignite CLI version:     v0.21.0
Ignite CLI build date:  2022-05-10T16:07:28Z
Ignite CLI source hash: 6009368c73266be248d33fe52b9bab653bf17973
Your OS:                linux
Your arch:              amd64
Your go version:        go version go1.18.2 linux/amd64

naively running ignite chain serve -v results in error

✗ ignite chain serve -v -r                                      
[STARPORT] Cosmos SDK's version is: stargate - v0.44.5
[STARPORT] 
[STARPORT] � Resetting the app state...
[STARPORT]   Building proto...
[STARPORT] cannot build app:
[STARPORT] 
[STARPORT]      cannot build app:
[STARPORT] 
[STARPORT]      error while running command /tmp/protoc2085362230 -I /tmp/153509734 -I .....................[redacted]..................
/tmp/protoc2085362230: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/protoc2085362230)
[STARPORT] : exit status 1
[STARPORT] Waiting for a fix before retrying...

... kindof stumbed.. googling around didn't fruit any working fix

> please advise on how to go about upgrading to latest ignite

any steps to take , or references would be helpful!

Thanks a lot and have a good one! :pray:

lava17 avatar Jun 08 '22 09:06 lava17

I've found https://docs.ignite.com/migration/ image theres no mention of 0.21.2, but ill start with going up the versions..

it is not clear to me how to upgrade Cosmos SDK, originally it came packaged in ignite

> Q: is it possible to keep the starport 0.19.2 binary working with cosmos 44.5 and also having ignite 0.21.2 working with Cosmos SDK 45.3 ?

guess ill peek around in the install script and see if i can make out anything there

lava17 avatar Jun 08 '22 10:06 lava17

Thanks for reporting the issue @lava17 👍

I am wondering if you are running Alpine linux or a distro that uses a variant of some base libraries. Alpine uses musl libc, so if that is your case it might actually mean that the libstdc++ is not be installed. I remember seeing similar issues somewhere else.

Otherwise to figure out the issue it might help to know the Linux distro you are using and also the installed libstdc++ version.

jeronimoalbi avatar Jun 15 '22 15:06 jeronimoalbi

@jeronimoalbi we are running into an issue that's at least closely related. On RHEL 8.6 (strings /usr/lib64/libstdc++.so.6|grep GLIBC) the latest GLIBCXX is 3.4.25, whereas the compiled ignite binary wants 3.4.26.

% ignite-0.22.2 chain serve
Cosmos SDK's version is: stargate - v0.45.4
🛠️  Building proto...
cannot build app:

	cannot build app:

	error while running command /tmp/protoc2549807364 -I /tmp/3511225304 ......
	/tmp/protoc2549807364: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/protoc2549807364)
: exit status 1
Waiting for a fix before retrying...

Now I'm not defending RHEL's conservatism... but perhaps the release binaries could use a protoc built against a more conservative libstdc++?

nickray avatar Jun 28 '22 10:06 nickray

Even better, you could use a statically linked build of protoc, so that it works on virtually any Linux system?

Or add a way to override which protoc executable is used e.g. environment variable?

kierdavis avatar Oct 24 '22 20:10 kierdavis

+1

Beyond just the RHEL compatibility issue, this would go a long way to helping teams easily adopt ignite. Upgrading the libstdc++ version is also not always the cleanest fix since lots of other tools in the host system depend on it.

nik-suri avatar Oct 25 '22 15:10 nik-suri

@jeronimoalbi could you update to statically link glibc++? Still running into this problem.

conorpp avatar Jun 30 '23 22:06 conorpp

The next Ignite CLI release will include #3476 where we migrated from using protoc directly to using Buf.build. I think it will potentially fix the issue because we removed the embedded protoc binary.

Right now is available in the nightly build.

jeronimoalbi avatar Aug 03 '23 14:08 jeronimoalbi

I believe this has been addressed in linked PR. Please reopen if otherwise.

salmad3 avatar Nov 13 '23 04:11 salmad3