gyp: Duplicate basenames in sources section

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

gyp: Duplicate basenames in sources section

Post by mwieder » Wed Dec 16, 2015 6:57 pm

This hasn't gotten any traction in the last couple of days so I'm moving it to its own topic.

Trying to build on 64-bit linux, I'm now getting

make config-linux-x86_64
make[1]: Entering directory `/home/mwieder/livecode7'
./config.sh --platform linux-x86_64
gyp/gyp --format make-linux --depth . --generator-output build-linux-x86_64/livecode -G default_target=default -DOS=linux -Dtarget_arch=x86_64
static library thirdparty/libiodbc/libiodbc.gyp:libiodbc#target has several files with the same basename:
Info: src/inst/Info.c src/trace/Info.c
misc: src/misc.c src/inst/misc.c
Some build systems, e.g. MSVC08, cannot handle that.
gyp: Duplicate basenames in sources section, see list above
make[1]: *** [config-linux-x86_64] Error 1
make[1]: Leaving directory `/home/mwieder/livecode7'
make: *** [all-linux-x86_64] Error 2

I looked at the log, and it seems that the libiodbc.gyp file hasn't changed in months. What has?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Fri Dec 18, 2015 6:59 am

OK - for anyone who follows behind on this, I had to grab a later version of gyp than the one in the linux mint repositories. And since there's no way for gyp to report version information, that took a bit of sleuthing. I finally grabbed and installed the latest .deb file from https://launchpad.net/ubuntu/+source/gyp.

But of course that wasn't enough by itself. I had to add the --no-duplicate-basename-check option to the config.sh file in order to get past that stupid error (which should really be a warning instead). Earlier builds of gyp don't support that option, thus the need to grab a later build of gyp in the first place.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Fri Dec 18, 2015 7:12 am

That got me to the next stumbling block

Code: Select all

apt-get install libicu-dev
If I had a way to edit the topic title I'd change it to "linux build instructions are out of date".

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Fri Dec 18, 2015 7:25 am

Awesome.

Code: Select all

  SOLINK_MODULE(target) out/Debug/obj.target/revzip/server-revzip.so
  COPY out/Debug/server-revzip.so
  AR(target) out/Debug/obj.target/thirdparty/libcairo/libcairo.a
  CXX(target) out/Debug/obj.target/external-revpdfprinter/revpdfprinter/src/revpdfprinter.o
  CXX(target) out/Debug/obj.target/external-revpdfprinter/revpdfprinter/src/revpdfprinter_lnx.o
  SOLINK_MODULE(target) out/Debug/obj.target/revpdfprinter/revpdfprinter.so
  COPY out/Debug/revpdfprinter.so
make[2]: Target `default' not remade because of errors.
rm toolchain_lc_compile_src_lc_compile_bootstrap_gyp_lc_compile_stage2_target_bootstrap.intermediate toolchain_lc_compile_src_lc_compile_bootstrap_gyp_lc_compile_stage3_target_bootstrap.intermediate toolchain_lc_compile_lc_run_gyp_lc_run_target_lc_run_lcb_modules.intermediate toolchain_lc_compile_src_lc_compile_bootstrap_gyp_lc_bootstrap_compile_target_gentle.intermediate engine_lcb_modules_gyp_engine_lcb_modules_target_generate_builtin_list.intermediate
make[2]: Leaving directory `/home/mwieder/livecode7/build-linux-x86_64/livecode'
make[1]: *** [compile-linux-x86_64] Error 2
make[1]: Leaving directory `/home/mwieder/livecode7'
make: *** [all-linux-x86_64] Error 2
make: Target `all' not remade because of errors.

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: gyp: Duplicate basenames in sources section

Post by peter-b » Fri Dec 18, 2015 12:13 pm

You should be using the version of gyp that we provide in the LiveCode git repository. You shouldn't need to install it yourself.

We already provide libICU headers. You shouldn't need to install them yourself.

The INSTALL-linux.md instructions exactly reflect the steps that everybody in the core dev team -- and the actual build servers that create the LiveCode installers -- use to compile LiveCode for x86-64 Linux.

Please have another go at following them, and if you're still stuck, maybe we can Skype or something. Let me know! :?
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Fri Dec 18, 2015 10:40 pm

You should be using the version of gyp that we provide in the LiveCode git repository.
WTF? That's not gonna work unless you call it with an absolute path.
I've got gyp in /usr/bin and it's in my path, so it's going to get called first otherwise.
And I'm not about to uninstall that because I need it for node.js.
I think if we're going to have our own special versions of standard tools then we should either
* rename them to avoid confusion
* invoke them explicitly by path
* temporarily change the path so that they're found first
We already provide libICU headers. You shouldn't need to install them yourself.
Well, I had to install them. Don't know what to say.
I got error messages that half a dozen of them weren't found, I installed them, and got past that point.

Here's my current path. See anything there that might be interfering?
PATH=/home/mwieder/.linuxbrew/bin:/home/mwieder/bin:/home/mwieder/.rbenv/shims:/home/mwieder/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Sat Dec 19, 2015 8:04 pm

Looks like config.sh is calling gyp/gyp, so it's using the version embedded in the repository.
And it gives

$ ./config.sh
gyp/gyp --format make-linux --depth . --generator-output build-linux-x86_64/livecode -G default_target=default -DOS=linux -Dtarget_arch=x86_64
static library thirdparty/libiodbc/libiodbc.gyp:libiodbc#target has several files with the same basename:
Info: src/inst/Info.c src/trace/Info.c
misc: src/misc.c src/inst/misc.c
libtool on Mac cannot handle that. Use --no-duplicate-basename-check to disable this validation.
gyp: Duplicate basenames in sources section, see list above

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: gyp: Duplicate basenames in sources section

Post by peter-b » Sun Dec 20, 2015 2:09 pm

I have an idea about what's going on.

Can you run the gyp command that config.sh generates under strace and check whether Python is loading Python libraries from the version of gyp embedded in the repository, or from the version you've installed?

Also, that gyp warning is just stupid. If generating rules for a static library for the make-linux format, I don't care about (a) libtool (because it's a static library, and libtool is only useful for dynamic libraries nor (b) Mac (it's in the name: make-linux. :roll:

You seem to frequently have problems with building and running on Linux that no-one else ever has and no-one can reproduce. Since you seem to have a very highly customized and clearly non-standard installation of Linux, and you are obviously technically competent, this might be a situation where you need to "Use the Source, Luke!" There isn't a shortage of issues that affect lots of people and can be reliably reproduced by the core dev team, after all!
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Sun Dec 20, 2015 7:39 pm

The python libraries are being loaded from /usr/lib/python2.7/, as in dist-packages/gyp.
Also, that gyp warning is just stupid.
Agreed, and if you look through the gyp dev discussions you'll see talk of removing it for at least a year now, but that hasn't happened yet.
you seem to have a very highly customized and clearly non-standard installation of Linux
Nay, I'm using a very standard linux mint 17 installation with the latest updates. Python 2.7 is a standard installation with the distro.
I think what's different about my setup is that I need both python 2.7 and 3.0 for different projects.
And npm packages its own gyp in node-gyp.

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: gyp: Duplicate basenames in sources section

Post by peter-b » Sun Dec 20, 2015 7:53 pm

Hmm, right. Okay, if you make a patch that adds the appropriate "behave sanely please" flag in config.sh iff the selected project format is make-linux, I'll test and review it. :wink:
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Sun Dec 20, 2015 8:43 pm

Ah, no. I've done that already, and that's what led my to install a newer version of gyp that supported the commandline option.
And that's what led to the error on the missing libICU libraries.

I think gyp is a good idea and all, at least in theory.
And probably I could go on building the LC engine if that's all I ever did with this sytem.
Someday maybe I'll throw this into a clean VM so it doesn't have to interact with the real world.

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: gyp: Duplicate basenames in sources section

Post by peter-b » Sun Dec 20, 2015 10:50 pm

mwieder wrote:Ah, no. I've done that already, and that's what led my to install a newer version of gyp that supported the commandline option.
And that's what led to the error on the missing libICU libraries.
Well, that is... deeply weird. I have no idea what's going on.
mwieder wrote:I think gyp is a good idea and all, at least in theory.
Theory aside, in actual practice it allows us to perform reliable builds for Mac OS, Windows, Linux, Android, iOS and HTML5, all with the official native toolchains, all from the same set of basic build definition files. Please don't underestimate how valuable this is.

Personally, if I only had to build LiveCode for Linux, I would use Autoconf. But sadly, this is not the case.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: gyp: Duplicate basenames in sources section

Post by peter-b » Mon Jan 04, 2016 12:53 pm

Did you manage to make any progress on getting the build to work? We really ought to figure out what's going on and fix it.

It's (obviously) quite difficult for me to reproduce without access to your system (or something that matches its configuration quite closely). Could you please Skype me when you get the chance? Hopefully we can work through some possibilities and narrow down what's going on.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Mon Jan 04, 2016 10:37 pm

OK - I think I've got a handle on what's going on.

Image

So I have three different versions of python installed. The OS needs python 2.7 as the default, and I need a more recent v3 for other projects. I don't remember why 3.2 is in there, but it may just be left over from before upgrading to 3.4.

What throws me at the moment is that the "which" command points to a symbolic link that appears to be version 2.7, but asking for the version of the default python returns 3.4.3. So the pythons appear to be snaking around each other in some fashion, and maybe not in a good way. I do not know which version gyp expects, but since gyp is invoking my 2.7 libraries, I'm guessing that it wants python 3.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: gyp: Duplicate basenames in sources section

Post by mwieder » Mon Jan 04, 2016 10:54 pm

OK - the 2.7 vs 3.4 mystery got solved... I had an alias in my .bashrc file. That's fixed now, but I still have the same "libtool on Mac cannot handle that" problem.

Locked

Return to “Engine Contributors”