Page 1 of 4

develop branch

Posted: Tue Sep 16, 2014 5:13 am
by mwieder
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.

Re: develop branch

Posted: Tue Sep 16, 2014 11:53 am
by LCfraser
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:).

Re: develop branch

Posted: Tue Sep 16, 2014 3:36 pm
by LCMark
@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.

Re: develop branch

Posted: Tue Sep 16, 2014 6:42 pm
by mwieder

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.

Re: develop branch

Posted: Wed Sep 17, 2014 11:11 am
by LCfraser
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.

Re: develop branch

Posted: Sun Sep 21, 2014 2:46 am
by mwieder
Develop is still not 64-bit safe.

I cloned into a new directory, which unexpectedly dropped me into a develop branch.
I removed the -march=i486 flag from the following files


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.

Re: develop branch

Posted: Sun Sep 21, 2014 5:51 am
by mwieder
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/ <./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'

Re: develop branch

Posted: Sun Sep 21, 2014 10:19 am
by LCMark
@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
The 'fetch libraries' script downloads all the prebuilt libs and headers from to save having to build them yourself. Although there are scripts in the prebuilt directory to build them locally too.

Re: develop branch

Posted: Sun Sep 21, 2014 5:01 pm
by mwieder
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
: not 2:
: not 7: 9: 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.

Re: develop branch

Posted: Sun Sep 21, 2014 6:34 pm
by LCfraser
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.

Re: develop branch

Posted: Sun Sep 21, 2014 8:49 pm
by mwieder
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.

Re: develop branch

Posted: Mon Sep 22, 2014 8:20 am
by LCMark
@mwieder: Hmmmm - try 'bash'... 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.

Re: develop branch

Posted: Tue Sep 23, 2014 5:52 am
by mwieder
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/ <./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.

Re: develop branch

Posted: Tue Sep 23, 2014 9:49 am
by LCMark
@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 './' 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 livecode
cd livecode
git submodule init
git submodule update
git checkout refactor
git submodule update
cd prebuilt
cd ..
MODE=debug make all
cd ide

Re: develop branch

Posted: Wed Sep 24, 2014 3:00 am
by mwieder
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 ./
bash ./

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

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

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

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