Building Firefox OS 2.2 on Ubuntu 14.04 - gcc

I am trying to build Firefox OS 2.2 on Ubuntu 14.04, but I keep running into an error that reads:
configure: error: Only GCC 4.6 or newer supported
*** Fix above errors and then restart with\
"make -f client.mk build"
> Build failed! <
This would normally lead me to suspect I might need GCC 4.6, but I am already using that. I have successfully built 2.0 and 2.1 on this machine in the past, and 1.1-1.4 previously on one of the '13 versions of Ubuntu before that, and I have had export CC=gcc-4.6 and export CXX=g++-4.6 in .profile practically since I installed 14.04 on this machine.
To see if I could spot anything obvious in the output I tee'd it to a file, and it is taking a good 7000 lines of output to reach the point where suddenly it thinks I am using a different gcc. If I change CC and CXX to not specify the version then it complains a lot sooner, so I take that to suggest that it is finding the right version for quite a while before complaining about this?
In any case, I am not finding anything else quite like this, and my experience with building mobile OSes is admittedly limited (only Firefox OS builds) but up until now the instructions have either worked or produced errors I could find someone else posting about already. Hopefully someone else happens to know something about why gcc-4.6 would give an error about needing version 4.6?
Edit
Turns out, there is a Bugzilla Bug Report (1121600) that mentions this. If I get the general sense of what it says, I think there is some kind of configuration thing wrong that is known to be true for some of the models that one can compile Firefox OS for?
I thought I would go ahead and put something about that here, since I ran into that. I wish I had a better sense of what the issue was so I could just fix it for my one device, but in case that is helpful to someone else searching for this who has not come up with the terms that led me there yet, that is apparently what is going on.

https://bugzilla.mozilla.org/show_bug.cgi?id=1121600
try replace:
<project name="platform_build" path="build" remote="gp-b2g" revision="501521623cc9a3117799a040e868bddf26b6cbde">
with:
<project name="platform_build" path="build" remote="gp-b2g" revision="3ce5007ab3562021551a35e2c06d323d1e8ee048">
and comment in config.sh (or will override your change)
repo_sync() {
rm -rf .repo/manifest* &&
to:
repo_sync() {
#rm -rf .repo/manifest* &&
finally execute the config script again
BRANCH=v2.2 ./config.sh <YOUR DEVICE>

Related

DSS(Darwin Streaming Server) install failed on OS X10.10

I want to build a Darwin Streaming Server on my mac for iOS development test. But after taking the following steps which I searched from google, it fails all the time.
Method 1:
Download from http://dss.macosforge.org/ ->Mac OS X Install -> Streaming Server;
Install the dmg;
It tries to open http://127.0.0.1:1220/ but fails with "This webpage is not available ERR_CONNECTION_REFUSED".
Method 2:
Download the source code of 6.0.3 version;
$ tar xvf DarwinStreamingSrvr6.0.3-Source.tar
$ cd DarwinStreamingSrvr6.0.3-Source
$ wget http://www.abrahamsson.com/dss-6.0.3.patch
$ patch -p0 < dss-6.0.3.patch
$ ./Buildit
Then, it fails with the following words.
Darwin Streaming Server
I don't know your platform. I'll assume this is a Linux x86 platform.
Please edit the BuildServer script & PlatformHeader.h to add your platform.
Building for Darwin.x86_64 with gcc
xcodebuild DarwinStreamingServer
=== BUILD LIBRARY TARGET AtomicLib (Library) OF PROJECT StreamingServer WITH CONFIGURATION Development ===
Check dependencies
Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)"
I tried to run ./Install, it showed me
Unable to perform install
You must be logged in as root to install Darwin Streaming Server
and I don't know what to do now.
PS: I've installed Xcode on my mac and didn't find any available document about Darwin Streaming Server, or I missed it?
Hope for any help. Thanks.
Calios and Jessica, thank you for your answers. I'm running using OS Windows 7 and installing DSS 5.5.5 for windows, and I also meet the condition same as with you.
However, after I followed your instructions, it's not close enough with our needs, because the button will lose meaning in presentation.
So I started digging more information from another articles, and I found interesting perception from a developer at this article. He said the following:
Maybe this has something to do with the perl script which generates the web sites?*
So starting from Jens's perception, I tried to downgrade my Perl Script from version 5.26 to 5.8. This resolved my problem, the interface displays correctly as in the DSS Tutorial.
Right now I'm still working on testing the DSS function
I hope this solution will help others.
Well, finally I solved this issue with the help of my friend.
Here's the steps of solution.
I've given up compiling and building on my own and downloaded the dmg file.(version 6.0.3)
Install the dmg as directions.
Then, go to /usr/sbin in terminal and find streamingadminserver.pl and QuickTimeStreamingServer.
Run them.
Check if they're running with ps aux|grep streaming.
Open http://localhost:1220/parse_xml.cgi in Safari or Chrome. It will show some textfield and a button.
However, there's no words at all ! Go to /Library/QuickTimeStreaming/AdminHtml and edit setup_assistant2.html.
Find line 333 and change it from return "$message{$name}"; to return $name;.
Then it shows some understandable words, though not exact words.
Till now, it can be partly work. However, in some steps I mentioned above, for example, html editing step, I really don't know why the words just don't show and just have a try.
Save the exact steps I did here for memory. It will be wonderful if it can help anyone or anyone have some good idea about it.
Thanks.
#SouravGupta, I am a newbie for stackoverflow, so I could not add comment to reply your question.
I just installed DDS 6.0.3 on Mac OS X El Capitan. I hit the same problem you had. I found that ** return "$message{$name}"; ** is no longer in setup_assistant2.html. It is in parse_xml.cgi (/Library/QuickTimeStreaming/AdminHtml). Just search for "sub foundString". There were two return places there. You need to change both in order to make it work.
It seems that DDS web admin software has localization function. Html files only contain string keywords. It suppose to use that "foundString" function to get translated string from keywords. However, for some reason, it returns empty string here even if there is a "messages" file inside html_en folder. I could not spend more time to figure out why right now.
QTSS/DSS Web Admin 6.0.3 requires Perl version 5.16 and earlier. OS X 10.11 El Capitan installs both Perl versions 5.16 and 5.18, but it defaults to using Perl version 5.18.
In order to run QTSS/DSS Web Admin in OS X 10.11 El Capitan, you need to examine each of the Perl script (.pl) within the AdminHtml folder and change the line #!/usr/bin/perl to #!/usr/bin/perl5.16.

Compiling Vim on OS X 10.10.3 does not work

[I am not sure whether this fits here or should be moved to apple.SE]
Today I got the idea to recompile my vim in order to get the latest updates. I have once or twice before followed the suggestion in this answer so I did it again. I cloned the repo and ran
./configure --prefix=/opt/local/ --with-features=huge
(I tried with no options, problem persists)
Invariably, compilation aborts when the compiler attempts to parse ObjC-Files (for whatever reason it has to)
/usr/include/objc/NSObject.h:22:4: error: unknown type name 'instancetype'
- (instancetype)self;
It seems the compiler does not know the current Objective-C standard.
There seems to be a problem with gcc because I found this bug ticket. However, the most recent update on this is from last year.
Can someone suggest a way to make this work?
EDIT: I know I could install it via homebrew or macports; yet I am still very curious how to fix this particular problem.
Also I tried manually changing the compiler to clang like so
CC=clang ./configure --prefix=/opt/local/ --with-features=huge
After simply setting CC=clang before running (which is what the configure help seems to advertise) and seeing it did nothing. However when specifying a compiler this way (I tried the same with gcc as well), many configure checks turn out no and it eventually aborts.
I am assuming that gcc has not been configured with Objective-C support (it supports at least C, C++ and Objective-C and the installer can opt for whatever support they want).
It's possible that the 3rd-party clang is in the same boat. However I know that the Xcode version supports all 3 languages and will pick-up the correct OSX Cocoa runtime libraries, so using that appears to have solved the issue:
$ CC="xcrun clang" ./configure --prefix=/opt/local/ --with-features=huge
However just using clang should have worked as well, if which clang returns /usr/bin/clang as you say it does, so I'm at a loss to explain exactly why that didn't work.

Can't upgrade gcc on Mac

So this is after having dropped $30 for Mac OS 10.7 and having downloaded XCode 4.3.2. After installing the command line tools, the installed version of gcc is still 4.2.4. I need 4.7. I've installed it and set the g++ link in /usr/bin to it. But when I try to compile any program via QtCreator, I get
unrecognized command line option -Xarch_x86_64
I found this discussed in a 3-year-old bug report here, but I really couldn't follow all the different shell commands etc. and my attempt to install liblastfm failed with the same error. The comment here,
The problem is that the GCC/G++ that is normally used to compile stuff
on Macs is actually just a wrapper.
And this wrapper has Mac-Only arguments like -Xarch_x86_64, which then
get converted into the correct args.
Seems like it might be hitting the nail on the head. Aaargh! Surely there has to be some way to get around this?
I created a custom makespec - in QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs, I copied the macx-g++ folder to macx-g++47. I then removed the "include(../common/g++macx.conf)" from that and included it's contents, except for the part that generates the error (i.e. the -X... thing).
I also finished with
QMAKE_CC = gcc-mp-4.7
QMAKE_CXX = g++-mp-4.7
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
...which is similar to the spec for macx-g++42.
Now, if I add '-spec macx-g++47' to the qmake args, it works.
A lot of effort for something simple...would love to know a better way.
There are several sources for newer gcc versions for OSX. Here is a small selection:
http://hpc.sourceforge.net/ (currently gcc 4.8, previous versions might also be available)
http://gcc.gnu.org/wiki/GFortranBinaries (has gcc 4.7.0 binary installer)
I assume that you did install the command line tools from within Xcode. Apple/Xcode is not always up to date with gcc, stability is more important here than bleeding edge.

Compiling ECL 11.1.1 on Mac OS X 10.7 (Lion)

I have been trying to build ECL under OS X 10.7 and I have been
running into trouble. When I try building it I end up getting a
segfault on the ecl_min stage.
I configure with the following line:
./configure --build=x86_64 --target=x86_64 --prefix=`pwd`/install_ecl
CC=/Developer/usr/bin/gcc-4.2
And the compile fails with:
if [ -f CROSS-COMPILER ]; then \
./CROSS-COMPILER compile; \
else \
ECLDIR=`pwd`/ ./ecl_min compile; \
fi
/bin/sh: line 1: 17433 Segmentation fault: 11 ECLDIR=`pwd`/ ./ecl_min compile
I have tried building gmp and boehm-gc externally and not using the
included ones, but unfortunately it ended up with the same results. I
have also tried the default llvm-gcc without much luck either.
Has anyone been able to compile ECL under Lion, and if so, what configure options / patches did you need to apply.
Update:
I was able to compile thanks to the accepted answer below. Here is the scripts that I used (Note: This is from a fresh git clone of ECL):
#!/bin/sh
ECL_INSTALLDIR="`pwd`/install_ecl"
mkdir -p $ECL_INSTALLDIR
./configure\
--prefix=$ECL_INSTALLDIR\
--enable-boehm\
--enable-unicode=no\
CC=/Developer/usr/bin/gcc\
CXX=/Developer/usr/bin/g++\
CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS"
make && make install
This problem has been fixed in git/CVS. As explained above, the cause for the miscompilation was the version of our garbage collector: we shipped the last one available: 7.1, but this does not work with OS X Lion. ECL now ships with two versions (7.1 and 7.2-cvs), using the newest one in OS X Lion. In other words, ECL from git/CVS (http://ecls.sourceforge.net/download.html) should compile and run out of the box.
This page describes the two causes of the problem (an issue with the compiler, and an issue with garbage collector compatibility), and offers a temporary solution until the issue itself is fixed. The instructions come down to:
Download a new build of the Boehm-Weiser garbage collector library, apply a patch (you can get a link to download both the library and the patch from that page as well), and install it somewhere
Configure ECL with these extra options:
--enable-boehm=system
CPPFLAGS=-I/location/for/library/include
LDFLAGS=-L/location/for/library/lib
Where /location/for/library is the prefix you used to install the garbage collector.
And then it should build properly.
I also found this MacPorts ticket which seems to be tracking this issue; check there for future updates to see if it will be fixed.

Getting MPFR to build on cygwin

I spent the whole day setting up GCC as per
http://cygwin.wikia.com/wiki/How_to_install_GCC_4.3.0
On the gcc make step, it told me it needed a c++ compiler to continue for whatever reason,
So I updated Cygwin in the usual fashion and got gcc-c++.
After that, cgywin did me the courtesy of deleting the 3 prereq libraries that I had installed previously,
So I went about remaking them. GMP worked fine, and then I got to MPFR. For whatever reason MPFR is throwing this error:
configure: error: libgmp not found or uses a different ABI.
The resources mention this error here.
I’m pretty sure its finding GMP alright as cygcheck shows it up no problem, and the config even mentions it finds it.
When I try:
./configure --with-gmp-build=/gmp/,
it throws:
error: header files gmp-impl.h and longlong.h not found
So far I have not been able to get MPFR working, despite googling and trying for hours.
MPC also fails to find GMP in the usual manner.
I've also tried just handing the libraries to GCC in a subdirectory and letting it compile them.
When I try that, it gets to the make step, then throws a stage1-bubble error and fails. No description of the error or anything.
I have no idea what else to try.
After compiling and installing gmp, I had the same problem building mpfr until I set correctly the library search path:
export LD_LIBRARY_PATH=/usr/local/lib
export LIBRARY_PATH=/usr/local/lib
export CPATH=/usr/local/include
as it is explained in the http://cygwin.wikia.com/wiki/How_to_install_GCC_4.3.0
Instead of this:
./configure --with-gmp-build=/gmp/
USE THIS:
./configure --with-gmp-build=/gmp
It doesn't like having the "/" at the end.
I know this post is a bit dated, but I was looking for an answer or results to a similar situation but with much more current versions of the same libraries. While reading this post as for some suggestions as well as other online material I was able to piece everything together. So for anyone who may be working with the newest releases here it goes:
First you will probably want to configure, make and install GMP first for both C and C++ as static libs; also make note of the architecture x86 or x64. Once you run make, make check, make install; and you are confidant that you have no errors, then when you go to configure MPFR you will want to run it as such:
./configure --with-gmp-build=/path/to/gmp --enable-static --disable-shared
and if the paths are set properly this should give you the needed generated make file.
I'm brand new to Unix-Posix environments and commands and new to Cygwin. I've mostly used Windows platforms and very few Macs or Apples. Matter of fact I've only been working at this for a little less than a week as I'm trying to do the same thing. So now I'm venturing into a whole new world of Unix... but it's sort of simulated through Cygwin as I'm still running windows.
I'm trying to build GMP, MPIR, MPFR & MPFRC++ all from the latest original distributions and eventually will try to integrate them into Visual Studio 2017.
I had actually found this post because I was able to build MPIR through visual studio with the help of python and vyasm, but as for GMP I needed Cygwin with GCC. It took me a little while to figure out how to get GMP to build properly but once I did and ran the tests I was able to have all pass with 0 failures. I then started to work with MPFR the same as you.
My similar issue was after I ran ./configure as default, it was giving me the message that the libgmp wasn't found. Also if I tried to call make, it would do nothing as the make file didn't exist. This led me back to doing google searches... While searching for tips, suggestions etc. I came across this Q/A. While I was reading this Q/A, the install files, some other FAQ and even another website, I was kind of able to piece everything together and what I have found that works is what I suggested above.
Not only do you need to set the flag --with-gmp-build but you also need to set the appropriate library types that gmp was built as and you need to make sure that the architecture types match too. They need to have the same matching ABIs.
Ah, just as I was about to finish up typing this answer, make check just finished running through Cygwin and I have a result of:
Testsuite summary for MPFR 4.0.1
============================================================================
# TOTAL: 180
# PASS: 180
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
I hope this helps you out. The only thing is for myself; I'll have to go back and probably run all of this again from the beginning including GMP only because I believe I only did GCC and not G++ and my next step is to try and build MPFRC++.
Then I might try to do some related libraries from here afterwards. My first phase is to try to build them all through Cygwin and GCC/G++. The next step will be to try and port them over to Visual Studio 2017.
You might want to use --with-gmp-lib=/path/to/gmp/lib/dir

Resources