Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 305 forks source link

KomodoEdit Fails to Build from Source on openSUSE Linux #3646

Open martinvahi opened 5 years ago

martinvahi commented 5 years ago

The test case with the reproduction script MIGHT be downloaded from

(About 570MiB. Unpacked size is about 770MiB.) https://temporary.softf1.com/2018/bugs/2018_12_23_KomodoEdit_Build_Failure_Bug_Report.tar.xz (SHA256: 35fdcf77f678c8e24bb78b2b1cab7fe39b124acc718fd258bd84d97d936d1162)

stderr:

target: configure
build: warning: Failed to get changenum, using 0 instead
'config.py' config file created
target: all
target: src
Failed to reach ActiveState internal mercurial mirror, using Mozilla canonical server
Traceback (most recent call last):
  File "build.py", line 2961, in <module>
    sys.exit( main(sys.argv) )
  File "build.py", line 2957, in main
    return build(args)
  File "build.py", line 2781, in build
    newArgv = targetFunc(argv)
  File "build.py", line 2462, in target_all
    target_src()
  File "build.py", line 2112, in target_src
    _run("wget -t 5 -T 30 --progress=dot:mega -O %s %s" % (bundleFile, bundleURL), log.info)
UnboundLocalError: local variable 'bundleURL' referenced before assignment

The "uname -a" gives

Linux linux-f26r 4.4.126-48-default #1 SMP Sat Apr 7 05:22:50 UTC 2018 (f24992c) x86_64 x86_64 x86_64 GNU/Linux

The "python --version" gives: Python 2.7.13 The "python3 --version" gives: Python 3.4.6

The "gcc -v" gives:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 4.8.5 (SUSE Linux)

stdout:

blessed = False
buildDir = '/home/ts2/m_local/seif_dekryptitult/Projektid/kodulehekylg_Minu/tsensuuri_trotsides_publitseeritav_arhiiv/koostamisel_olevad_kollektsioonid/KomodoEdit/src/src_with_autodownloaded_Mozilla/KomodoEdit/mozilla/build'
buildOpt = []
buildTag = None
buildType = 'release'
changenum = 0
compiler = None
configureOptions = ['-k', '10.10']
enableMar = True
gcc = 'gcc'
gxx = 'g++'
jsStandalone = False
komodoCommaVersion = '10,10'
komodoUndottedVersion = '1010'
komodoVersion = '10.10'
mozBuildExtensions = []
mozObjDir = 'ko-rel'
mozSrcHgRepo = '3500'
mozSrcHgTag = None
mozSrcName = 'moz3500'
mozSrcScheme = '3500'
mozSrcType = 'hg'
mozVer = 35.0
mozconfig = "# Options for 'configure' (same as command-line options).\nmk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ko-rel\nexport CC=gcc\nexport CXX=g++\nac_add_options --enable-stdcxx-compat\nac_add_options --disable-gstreamer\nac_add_options --enable-gold\nac_add_options --enable-help-viewer\nac_add_options --disable-tests\nac_add_options --enable-optimize\nac_add_options --disable-debug\nac_add_options --enable-application=komodo\n"
patchesDirs = ['patches-new']
platform = 'linux-x86_64'
platinfo = {'name': 'linux-x86_64', 'libc': 'libc6', 'distro_ver': '42.3', 'libcpp': 'libcpp6', 'lsb_version': 'core-5.0-amd64:core-5.0-noarch:desktop-5.0-amd64:desktop-5.0-noarch:languages-5.0-amd64:languages-5.0-noarch', 'distro_desc': 'openSUSE Leap 42.3', 'arch': 'x86_64', 'glibc_ver': '2.22', 'os': 'linux', 'glibc': 'glibc', 'os_ver': '4.4.126', 'distro': 'openSUSE project'}
pyVer = '2.7'
python = '/home/ts2/m_local/seif_dekryptitult/Projektid/kodulehekylg_Minu/tsensuuri_trotsides_publitseeritav_arhiiv/koostamisel_olevad_kollektsioonid/KomodoEdit/src/src_with_autodownloaded_Mozilla/KomodoEdit/mozilla/prebuilt/python2.7/linux-x86_64/bin/python'
pythonVersion = '2.7'
srcTreeName = 'moz3500-ko10.10'
stripBuild = False
universal = False
withCrashReportSymbols = False
withPGOCollection = False
withPGOGeneration = False
Naatan commented 5 years ago

Looks like we have a bug here where bundleURL isnt properly being set:

https://github.com/Komodo/KomodoEdit/blob/master/mozilla/build.py#L2112

th3coop commented 5 years ago

@martinvahi I doubt i'm going to be able to reproduce this but I can assist you debug. @Naatan appears to be correct. Could you try throw some print statements to see what's happening in the if...else statement above line 2112? You should be hitting the else and bundleURL should be set at line 2110.

Defman21 commented 5 years ago

For some reason, he hits the inside_as_network statement. His log contains Failed to reach ActiveState internal mercurial mirror, using Mozilla canonical server before the traceback happens.

https://github.com/Komodo/KomodoEdit/blob/master/mozilla/build.py#L2104

th3coop commented 5 years ago

@martinvahi any chance you can pull and give it another shot? Thanks for catching what my blind self missed @Defman21.

martinvahi commented 5 years ago

I'll give it a try, but I'm kind of busy right now, so I'll try to do it within 4 days. No promises, but that's my current plan.

martinvahi commented 5 years ago

As the downloaded, upstream(Your) version of the build.py at my former test case differed substantially from the referred

https://github.com/Komodo/KomodoEdit/blob/master/mozilla/build.py#L2104

I downloaded the referred build.py and added some print lines there, like

print("GUID=='<GUID that is unique within this file>'")

The uniqueness of the GUIDs was assured with my UpGUID tool

https://github.com/martinvahi/mmmv_devel_tools/tree/master/src/mmmv_devel_tools/GUID_trace/src/UpGUID

that looks up GUIDs with a regex and then swaps them with newly generated ones. My openSUSE has the Perl installed to the maximum extent that its package collection system allows it to be installed, but the configure script seems to fail with some complaints about the Perl missing from the system.

 0:08.61 configure:4903: checking for minimum required perl version >= 5.006
 0:08.61 configure:4914: checking for full perl installation
 0:08.61 Can't locate Config.pm:   Permission denied at -e line 1.
 0:08.61 BEGIN failed--compilation aborted at -e line 1.
 0:08.61 configure: error: Cannot find Config.pm or $Config{archlib}.  A full perl installation is required.
 0:08.61 *** Fix above errors and then restart with\
 0:08.61                "/usr/bin/gmake -f client.mk build"
 0:08.61 /opt/andmekettad/l2bikulutamisflash_01_59koma6GiB/kasutajad/tarkvarakatsetused/demo/2019_01_17_KomodoEdit_Build_Failure_Bug_Report/KomodoEdit/mozilla/build/moz3500-ko10.10/mozilla/client.mk:361: recipe for target 'configure' failed
 0:08.61 gmake[2]: *** [configure] Error 1
 0:08.61 /opt/andmekettad/l2bikulutamisflash_01_59koma6GiB/kasutajad/tarkvarakatsetused/demo/2019_01_17_KomodoEdit_Build_Failure_Bug_Report/KomodoEdit/mozilla/build/moz3500-ko10.10/mozilla/client.mk:375: recipe for target '/opt/andmekettad/l2bikulutamisflash_01_59koma6GiB/kasutajad/tarkvarakatsetused/demo/2019_01_17_KomodoEdit_Build_Failure_Bug_Report/KomodoEdit/mozilla/build/moz3500-ko10.10/mozilla/ko-rel/Makefile' fai

The whole build folder, ~3GiB, with testing build script and the stderr and stdout values MIGHT be downloadable from

https://temporary.softf1.com/2019/bugs/2019_01_18_KomodoEdit_Build_Failure_Bug_Report.tar.xz

Naatan commented 5 years ago

@martinvahi I'm unclear on what you are requesting help with at this stage, the error you are receiving seems self explanatory: you need a full perl installation. Are you saying you have what you would consider "a full perl installation" and so the error doesn't help you forward?

martinvahi commented 5 years ago

First of all, the "new error" is not necessarily the same that I first reported, but the overall complaint, bug, is that the KomodoEdit does not compile on an updated/upgraded mainstream Linux distribution that has everything relevant installed.

Are you saying you have what you would consider "a full perl installation" and so the error doesn't help you forward?

Correct. I ran the openSUSE package manager, yast, typed "perl" and "switched on" everything that the search string "perl" gave, except a packages named

perl-Cyrus-SIEVE-managesieve
perl-Wx
perl-YAML-LibYAML-debuginfo
perl-YAML-LibYAML-debugsource
postgresql10-plperl

were installed. The SIEVE related package seems to have something to do with mail filtering and the the Wx seems to have somethign to do with the wxWidgets. my OS is also up to date.

linux-f26r:/home/ts2/tmp #  cat /etc/os-release
NAME="openSUSE Leap"
VERSION="42.3"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.3"
PRETTY_NAME="openSUSE Leap 42.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

I suspect that the KomodoEdit code changes at the repository so fast that new bugs emerge before the old ones are removed. A counter measure might be to release some "beta" for testing and declare all bug reports about the trunk to be useless, including my current bug report, regardless of the fact that there really does seem to be something wrong. I guess it's a matter of philosophy. I assumed that anything published without explicit warnings about their state should be buildable, but different people do have different methodologies and mine is NOT the only way to see this world

Thank You for reading my comment. :-)

Naatan commented 5 years ago

Komodo is based on Mozilla, which has a very complex build system. The step you're at is not building Komodo at all, it's building Mozilla. In my experience when it comes to linux it's almost never "just install the deps", often there are some distro specific requirements that you have to uncover as you are trying to get the build working.

I think the problem here might be either Perl configuration or the Perl version. @cgchoffman could you confirm what Perl version our linux builds use?

th3coop commented 5 years ago

@martinvahi, the Linux boxes have ActivePerl 5.16 on them. I don't know enough about YAST systems but can you run perl -v to see what version it might have installed?

martinvahi commented 5 years ago
ts2@linux-f26r:~/demo$ date
Mon Jan 21 08:50:17 EET 2019
ts2@linux-f26r:~/demo$ uname -a
Linux linux-f26r 4.4.126-48-default #1 SMP Sat Apr 7 05:22:50 UTC 2018 (f24992c) x86_64 x86_64 x86_64 GNU/Linux
ts2@linux-f26r:~/demo$ cat /etc/os-release 
NAME="openSUSE Leap"
VERSION="42.3"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.3"
PRETTY_NAME="openSUSE Leap 42.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
ts2@linux-f26r:~/demo$ echo $SHELL
/bin/bash
ts2@linux-f26r:~/demo$ perl -v

This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-thread-multi

Copyright 1987-2013, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

ts2@linux-f26r:~/demo$ which perl
/usr/bin/perl
ts2@linux-f26r:~/demo$
martinvahi commented 5 years ago

What regards to the openSUSE yast, then it's a terminal based text-GUI application that can be run by root. It's a lot like the the Raspberry Pi Raspbian(Debian distro) apt-get and raspi-config all-in-one. It's really meant for dumb-end-user-administrators like me, so just

sudo su
# and
yast
# and the rest is a piece of cake

Think of the yast as a terminal-GUI based Windows Control Panel analogue for openSUSE.

martinvahi commented 5 years ago

One line of thought is that the https://www.travis-ci.org/ advertises that, I quote: "Testing your open source projects will always be free!" The KomodoEdit is an open source project and they MIGHT have an openSUSE VM, among many other VMs.

th3coop commented 5 years ago

@martinvahi, I should address your concern about Komodo Edit apparently being broken: The Komodo Edit build it working fine and has been released with the latest code: http://downloads.activestate.com/Komodo/releases/11.1.1/ That is built on Centos 6. I did a test build yesterday and it ran to completion without issue.

The issue here looks to be platform specific or a configuration issue. Since it's failing in the Mozilla code I'd make sure you've thoroughly checked the Linux Requirements for Mozilla: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Linux_Prerequisites

Having said all that, we're here to help you get this working :)

I wonder if install ActivePerl is actually the key here. Our build env script explicitly places it at the front of the PATH. Perhaps the install you have isn't a "full installation" and is missing certain packages but the error we're seeing isn't reporting proper warnings to say WHAT is missing. Can you try installing ActivePerl and trying again?