develop branch

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:

develop branch

Post by mwieder » Tue Sep 16, 2014 5:13 am

Up until now I've been building and branching off the master branch. Now I need to start building 7.0 binaries, which as I understand it, means building off the develop branch. I pulled the latest, and when I did a submodule update I received

fatal: reference is not a tree: 82913092011531216180591dfa85476adcb82e1e
Unable to checkout '82913092011531216180591dfa85476adcb82e1e' in submodule path 'ide'

and when I build against the branch (on 64-bit linux mint) I end up with

./src/core/Sk64.cpp:1:0: error: CPU you selected does not support x86-64 instruction set

So I'm a wee bit concerned. Building against the master branch still works as expected.

LCfraser
Livecode Staff Member
Livecode Staff Member
Posts: 71
Joined: Thu Nov 28, 2013 11:18 am
Contact:

Re: develop branch

Post by LCfraser » Tue Sep 16, 2014 11:53 am

The "develop" branch is currently LiveCode 6.7.

Up until earlier today, the 7.0 branch has been called "refactor-syntax_unicode" though I have just renamed it to "refactor" to save on typing and to actually describe what it does.

If you do decide to build 6.7 in 64-bit mode, you'll need to tweak the Makefiles slightly to remove "-mcpu=i486" from the CFLAGS (we added it because otherwise GCC assumes i386 and generates incorrect opcodes for atomic operations). In the 7.0 Makefiles, this option is only added if the target architecture is "i386" so you shouldn't need to change anything.

The error git is giving from develop means that there is a submodule that has been updated but that the person to made the update forgot to push the updated submodule. I'll prod some people until I find the culprit (usually, it is me but I'm innocent this time :wink:).

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: develop branch

Post by LCMark » Tue Sep 16, 2014 3:36 pm

@mwieder: The missing IDE commit was my fault - I pushed the main repo before I pushed the ide repo... There was only about 5 mins between these events so you were quite unfortunate - all should be well now on develop.

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: develop branch

Post by mwieder » Tue Sep 16, 2014 6:42 pm

LOL

But I see from Fraser's post that I actually want the "refactor-syntax_unicode" branch anyway for 7.0.
So given the way my memory's working lately... we talked at the conference about reissuing my pull request for floor and ceil functions... did you want this against 6.7 or 7.0? I'm happy to rebase the branch, and I think I should do this against the 7.0 tree, but I figured I should ask first before I end up doing this twice.

LCfraser
Livecode Staff Member
Livecode Staff Member
Posts: 71
Joined: Thu Nov 28, 2013 11:18 am
Contact:

Re: develop branch

Post by LCfraser » Wed Sep 17, 2014 11:11 am

7.0 would definitely be better - enough things have changed between 6.7 and 7.0 that you'd have to do the work twice to add it to both.

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: develop branch

Post by mwieder » Sun Sep 21, 2014 2:46 am

Develop is still not 64-bit safe.

I cloned https://github.com/runrev/livecode.git into a new directory, which unexpectedly dropped me into a develop branch.
I removed the -march=i486 flag from the following files

engine/Makefile.kernel-common,
engine/Makefile.kernel-server,
libgraphics/Makefile
thirdparty/libskia/Makefile

Did a "make all" and received

./src/externalv0.cpp:761:23: error: cast from ‘const char*’ to ‘uint32_t {aka unsigned int}’ loses precision [-fpermissive]
./src/externalv0.cpp:789:23: error: cast from ‘const char*’ to ‘uint32_t {aka unsigned int}’ loses precision [-fpermissive]

so I converted the uint32_t declarations in those two functions to size_t and compiled successfully.
I'm not sure where the develop branch is heading, so I'm not sure how far to push things, but I'll issue a pull request against develop for these changes.

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: develop branch

Post by mwieder » Sun Sep 21, 2014 5:51 am

and trying the refactor branch seems still to have ssl problems:

I see that the refactor-syntax_unicode branch was changed to refactor, but that isn't the case for the submodules.
I updated the ide and thirdparty submodules to "refactor-syntax_unicode", but I'm not sure what the corresponding branch should be for prebuilt. So far everything I've tried has come up with ssl errors.

make[1]: Entering directory `/home/mwieder/Documents/livecode/thirdparty/libopenssl'
mkdir -p ./src
../../util/weak_stub_maker.pl <./ssl.stubs >./src/sslstubs.cpp
: No such file or directory

/home/mwieder/Documents/livecode/revdb/./src/mysql_connection.cpp:28: undefined reference to `initialise_weak_link_crypto'

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: develop branch

Post by LCMark » Sun Sep 21, 2014 10:19 am

@mwieder: The 'refactor' branch should be used for all new features and such. Both 6.7 and 7.0 will go GM at the same time, so the code on 'refactor' will be the basis for all new versions post-7.0. As 6.7 and 7.0 are in RC, we don't intend to add any new functionality to these releases now.

Getting up and running on 'refactor' is easy, but as 'prebuilt' is no longer a submodule there is an extra step:
  • git checkout refactor
  • git submodule update
  • cd prebuilt
  • sh fetch-libraries.sh
The 'fetch libraries' script downloads all the prebuilt libs and headers from livecode.com to save having to build them yourself. Although there are scripts in the prebuilt directory to build them locally too.

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: develop branch

Post by mwieder » Sun Sep 21, 2014 5:01 pm

Well, the initial checkout of refactor threw an error on trying to rm the prebuilt directory because it wasn't empty. I'm thinking that maybe the directory contents were removed originally when the build scripts were created but they were not removed from git tracking.

Afterwards I tried running the fetch-libraries script and got

prebuilt: master$ sh fetch-libraries.sh
: not foundries.sh: 2: fetch-libraries.sh:
: not foundries.sh: 7: fetch-libraries.sh:
fetch-libraries.sh: 9: fetch-libraries.sh: Syntax error: "(" unexpected
prebuilt: master$

At this point I'm not sure what's supposed to be in the prebuilt directory. There's no refactor branch there, so I don't want to pick one at random and start deleting files. What's the correct prebuilt branch for building a 7.x build? My guess is that there's supposed to be a refactor branch but it hasn't been pushed to the github repository.

LCfraser
Livecode Staff Member
Livecode Staff Member
Posts: 71
Joined: Thu Nov 28, 2013 11:18 am
Contact:

Re: develop branch

Post by LCfraser » Sun Sep 21, 2014 6:34 pm

Easiest thing to do is just rm -rf the prebuilt directory and do a checkout of refactor: the prebuilt folder still exists but it isn't a submodule any more. Git seems to be less than happy with this change, unfortunately.

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: develop branch

Post by mwieder » Sun Sep 21, 2014 8:49 pm

No, I did that before - that's what got me into the mess in the first place.
If I rm -rf the prebuilt directory then I can't build any of the other branches any more.

I'm working in a new clone of the original fork now because the ssl libraries are completely messed up in the original after removing the prebuilt libraries. I haven't even been able to reset my way out of that mess yet.

I have a love/hate relationship with git submodules, but without the love part.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: develop branch

Post by LCMark » Mon Sep 22, 2014 8:20 am

@mwieder: Hmmmm - try 'bash fetch-libraries.sh'... The script definitely works on Mac when doing 'sh', but perhaps Linux is a little more exacting (in that when you do 'sh' you really do get 'sh' rather than 'bash'). I'm not sure what I did, but I can freely switch between refactor and develop in the same checked out repository - git never complains... Perhaps doing a 'git checkout refactor --force' the first time does it. In any case, I agree with your sentiment re submodules, hence why we've tried to eliminate one - the other two will hopefully be eliminated in time also.

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: develop branch

Post by mwieder » Tue Sep 23, 2014 5:52 am

Nope. sh vs bash has little (almost no) effect. I have now cloned and rebuilt from scratch a total of four times.

If I do a git submodule update after checking out the refactor branch, there's no refactor branch on the submodules (just shows up as "no branch"). If I build against that I get
../../util/weak_stub_maker.pl <./ssl.stubs >./src/sslstubs.cpp
and then my master branch is corrupted with lots of undefined references to the SSL library.

And I made my old corrupted repository a local remote so that I can recover my local development branches from it.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: develop branch

Post by LCMark » Tue Sep 23, 2014 9:49 am

@mwieder: After doing 'submodule update', the submodules will be listed as being in 'detached head state'. Submodules track a commit reference *not* a named branch. I tried here and './fetch-libraries.sh' works (it would appear there is a difference between 'sh' and 'bash', at least on Ubuntu) - you do need to make sure curl is installed though.

Here's the list of shell commands I did to get a freshly cloned and built x64 linux IDE running from git (this was on Ubuntu 12.06 x64):

Code: Select all

git clone https://github.com/runrev/livecode.git livecode
cd livecode
git submodule init
git submodule update
git checkout refactor
git submodule update
cd prebuilt
./fetch-libraries.sh
cd ..
MODE=debug make all
cd ide
../_build/linux/x86_64/debug/engine-community

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: develop branch

Post by mwieder » Wed Sep 24, 2014 3:00 am

Yes, I realize the no-branch thing is a result of the submodule update. The problem is that running a make in that state completely screws up the ssl library for the master branch.

And the following all fail on my system:
sh ./fetch-libraries.sh
bash ./fetch-libraries.sh
./fetch-libraries.sh

prebuilt: (no branch)$ ./fetch-libraries.sh
bash: ./fetch-libraries.sh: /bin/bash^M: bad interpreter: No such file or directory

prebuilt: (no branch)$ sh ./fetch-libraries.sh
: not foundraries.sh: 2: ./fetch-libraries.sh:
: not foundraries.sh: 7: ./fetch-libraries.sh:
./fetch-libraries.sh: 9: ./fetch-libraries.sh: Syntax error: "(" unexpected

which curl returns /usr/bin/curl
and curl --version shows curl 7.27.0

The results I'm getting from running fetch-libraries.sh look a bit like line-ending problems, so I'll go check that out.

Locked

Return to “Engine Contributors”