Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Heroku #35

Closed
syu-id opened this issue Dec 1, 2014 · 6 comments
Closed

Build fails on Heroku #35

syu-id opened this issue Dec 1, 2014 · 6 comments

Comments

@syu-id
Copy link

syu-id commented Dec 1, 2014

Glad to hear that libsass-python is again compatible with older GCC versions.
However when I try to deploy my app to Heroku with libsass-python 0.6.2, it still fails.

         Running setup.py install for libsass
           building '_sass' extension
           gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./libsass -I/app/.heroku/python/include/python2.7 -c pysass.cpp -o build/temp.linux-x86_64-2.7/pysass.o -c -O2 -fPIC -std=c++0x -Wall -Wno-parentheses
           cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
           In file included from /app/.heroku/python/include/python2.7/Python.h:8,
                            from pysass.cpp:4:
           /app/.heroku/python/include/python2.7/pyconfig.h:1182:1: warning: "_POSIX_C_SOURCE" redefined
           In file included from /usr/include/unistd.h:26,
                            from pysass.cpp:1:
           /usr/include/features.h:158:1: warning: this is the location of the previous definition
           In file included from /app/.heroku/python/include/python2.7/Python.h:8,
                            from pysass.cpp:4:
           /app/.heroku/python/include/python2.7/pyconfig.h:1204:1: warning: "_XOPEN_SOURCE" redefined
           In file included from /usr/include/unistd.h:26,
                            from pysass.cpp:1:
           /usr/include/features.h:160:1: warning: this is the location of the previous definition
           gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./libsass -I/app/.heroku/python/include/python2.7 -c libsass/output_compressed.cpp -o build/temp.linux-x86_64-2.7/libsass/output_compressed.o -c -O2 -fPIC -std=c++0x -Wall -Wno-parentheses
           cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
           In file included from libsass/output_compressed.cpp:3:
           libsass/ast.hpp: In constructor ???Sass::Hashed::Hashed(size_t)???:
           libsass/ast.hpp:211: error: ???class std::unordered_map<Sass::Expression*, Sass::Expression*, std::hash<Sass::Expression*>, std::equal_to<Sass::Expression*>, std::allocator<std::pair<Sass::Expression* const, Sass::Expression*> > >??? has no member named ???reserve???
           libsass/ast.hpp: In member function ???Sass::Hashed& Sass::Hashed::operator+=(Sass::Hashed*)???:
           libsass/ast.hpp:236: error: expected initializer before ???:??? token
           libsass/ast.hpp:239: error: expected primary-expression before ???return???
           libsass/ast.hpp:239: error: expected ???;??? before ???return???
           libsass/ast.hpp:239: error: expected primary-expression before ???return???
           libsass/ast.hpp:239: error: expected ???)??? before ???return???
           libsass/ast.hpp: In member function ???virtual bool Sass::Map::operator==(Sass::Expression&) const???:
           libsass/ast.hpp:719: error: expected initializer before ???:??? token
           libsass/ast.hpp:721: error: expected primary-expression before ???return???
           libsass/ast.hpp:721: error: expected ???;??? before ???return???
           libsass/ast.hpp:721: error: expected primary-expression before ???return???
           libsass/ast.hpp:721: error: expected ???)??? before ???return???
           libsass/ast.hpp: In member function ???virtual size_t Sass::Map::hash()???:
           libsass/ast.hpp:733: error: expected initializer before ???:??? token
           libsass/ast.hpp:736: error: expected primary-expression before ???return???
           libsass/ast.hpp:736: error: expected ???;??? before ???return???
           libsass/ast.hpp:736: error: expected primary-expression before ???return???
           libsass/ast.hpp:736: error: expected ???)??? before ???return???
           libsass/ast.hpp: In member function ???virtual size_t Sass::Function_Call::hash()???:
           libsass/ast.hpp:920: error: expected initializer before ???:??? token
           libsass/ast.hpp:923: error: expected primary-expression before ???return???
           libsass/ast.hpp:923: error: expected ???;??? before ???return???
           libsass/ast.hpp:923: error: expected primary-expression before ???return???
           libsass/ast.hpp:923: error: expected ???)??? before ???return???
           In file included from libsass/output_compressed.cpp:3:
           libsass/ast.hpp: In member function ???virtual size_t Sass::String_Schema::hash()???:
           libsass/ast.hpp:1257: error: expected initializer before ???:??? token
           libsass/ast.hpp:1260: error: expected primary-expression before ???return???
           libsass/ast.hpp:1260: error: expected ???;??? before ???return???
           libsass/ast.hpp:1260: error: expected primary-expression before ???return???
           libsass/ast.hpp:1260: error: expected ???)??? before ???return???
           error: command 'gcc' failed with exit status 1
           Complete output from command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u55118/libsass/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Vy_BxU-record/install-record.txt --single-version-externally-managed --compile:
           running install

       running build

       running build_py

       creating build

       creating build/lib.linux-x86_64-2.7

       copying sass.py -> build/lib.linux-x86_64-2.7

       copying sassc.py -> build/lib.linux-x86_64-2.7

       copying sasstests.py -> build/lib.linux-x86_64-2.7

       creating build/lib.linux-x86_64-2.7/sassutils

       copying sassutils/wsgi.py -> build/lib.linux-x86_64-2.7/sassutils

       copying sassutils/distutils.py -> build/lib.linux-x86_64-2.7/sassutils

       copying sassutils/__init__.py -> build/lib.linux-x86_64-2.7/sassutils

       copying sassutils/builder.py -> build/lib.linux-x86_64-2.7/sassutils

       running build_ext

       building '_sass' extension

       creating build/temp.linux-x86_64-2.7

       creating build/temp.linux-x86_64-2.7/libsass

       gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./libsass -I/app/.heroku/python/include/python2.7 -c pysass.cpp -o build/temp.linux-x86_64-2.7/pysass.o -c -O2 -fPIC -std=c++0x -Wall -Wno-parentheses

       cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

       In file included from /app/.heroku/python/include/python2.7/Python.h:8,

                        from pysass.cpp:4:

       /app/.heroku/python/include/python2.7/pyconfig.h:1182:1: warning: "_POSIX_C_SOURCE" redefined

       In file included from /usr/include/unistd.h:26,

                        from pysass.cpp:1:

       /usr/include/features.h:158:1: warning: this is the location of the previous definition

       In file included from /app/.heroku/python/include/python2.7/Python.h:8,

                        from pysass.cpp:4:

       /app/.heroku/python/include/python2.7/pyconfig.h:1204:1: warning: "_XOPEN_SOURCE" redefined

       In file included from /usr/include/unistd.h:26,

                        from pysass.cpp:1:

       /usr/include/features.h:160:1: warning: this is the location of the previous definition

       gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./libsass -I/app/.heroku/python/include/python2.7 -c libsass/output_compressed.cpp -o build/temp.linux-x86_64-2.7/libsass/output_compressed.o -c -O2 -fPIC -std=c++0x -Wall -Wno-parentheses

       cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++

       In file included from libsass/output_compressed.cpp:3:

       libsass/ast.hpp: In constructor ???Sass::Hashed::Hashed(size_t)???:

       libsass/ast.hpp:211: error: ???class std::unordered_map<Sass::Expression*, Sass::Expression*, std::hash<Sass::Expression*>, std::equal_to<Sass::Expression*>, std::allocator<std::pair<Sass::Expression* const, Sass::Expression*> > >??? has no member named ???reserve???

       libsass/ast.hpp: In member function ???Sass::Hashed& Sass::Hashed::operator+=(Sass::Hashed*)???:

       libsass/ast.hpp:236: error: expected initializer before ???:??? token

       libsass/ast.hpp:239: error: expected primary-expression before ???return???

       libsass/ast.hpp:239: error: expected ???;??? before ???return???

       libsass/ast.hpp:239: error: expected primary-expression before ???return???

       libsass/ast.hpp:239: error: expected ???)??? before ???return???

       libsass/ast.hpp: In member function ???virtual bool Sass::Map::operator==(Sass::Expression&) const???:

       libsass/ast.hpp:719: error: expected initializer before ???:??? token

       libsass/ast.hpp:721: error: expected primary-expression before ???return???

       libsass/ast.hpp:721: error: expected ???;??? before ???return???

       libsass/ast.hpp:721: error: expected primary-expression before ???return???

       libsass/ast.hpp:721: error: expected ???)??? before ???return???

       libsass/ast.hpp: In member function ???virtual size_t Sass::Map::hash()???:

       libsass/ast.hpp:733: error: expected initializer before ???:??? token

       libsass/ast.hpp:736: error: expected primary-expression before ???return???

       libsass/ast.hpp:736: error: expected ???;??? before ???return???

       libsass/ast.hpp:736: error: expected primary-expression before ???return???

       libsass/ast.hpp:736: error: expected ???)??? before ???return???

       libsass/ast.hpp: In member function ???virtual size_t Sass::Function_Call::hash()???:

       libsass/ast.hpp:920: error: expected initializer before ???:??? token

       libsass/ast.hpp:923: error: expected primary-expression before ???return???

       libsass/ast.hpp:923: error: expected ???;??? before ???return???

       libsass/ast.hpp:923: error: expected primary-expression before ???return???

       libsass/ast.hpp:923: error: expected ???)??? before ???return???

       In file included from libsass/output_compressed.cpp:3:

       libsass/ast.hpp: In member function ???virtual size_t Sass::String_Schema::hash()???:

       libsass/ast.hpp:1257: error: expected initializer before ???:??? token

       libsass/ast.hpp:1260: error: expected primary-expression before ???return???

       libsass/ast.hpp:1260: error: expected ???;??? before ???return???

       libsass/ast.hpp:1260: error: expected primary-expression before ???return???

       libsass/ast.hpp:1260: error: expected ???)??? before ???return???

       error: command 'gcc' failed with exit status 1

       ----------------------------------------
       Cleaning up...
       Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u55118/libsass/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Vy_BxU-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u55118/libsass
Traceback (most recent call last):
  File "/app/.heroku/python/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)

 !     Push rejected, failed to compile Multipack app
@gone
Copy link

gone commented Dec 31, 2014

+1

@kcolton
Copy link

kcolton commented Jan 2, 2015

I was running into this same issue and discovered 2 things:

  1. libsass==0.5.1 compiled fine
  2. In November Heroku released the new "cedar-14" stack as default which is built off Ubuntu 14, compared to 10 of the original. Cedar-14 comes along with a newer gcc / g++ (4.8).

Upgrading to cedar-14 resolved this compilation issue for me.

Even though the original cedar stack should be compatible (g++ 4.4), it doesn't seem happy with the exact setup for whatever reason.

The upgrade to cedar-14 was pain free for me.

@gone
Copy link

gone commented Jan 2, 2015

Updating to cedar-14 also fixed this bug for me.

@dalguji
Copy link

dalguji commented Jan 29, 2015

On CentOS 6.6, build with version >= 0.6.0 fails while 0.5.1 works fine as kcolton mentioned above. You can find the error messages here.

@asottile
Copy link
Member

asottile commented Dec 4, 2015

Unfortunately you'll need a newer version of gcc, this is documented here: https://github.com/dahlia/libsass-python#install and here: https://github.com/sass/libsass#readme

@asottile asottile closed this as completed Dec 4, 2015
@k-funk
Copy link

k-funk commented May 17, 2016

There's a PR in libsass to work with GCC 4.4. If anyone has the time to review it/help them: sass/libsass#1623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants