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

Building with Makefiles instructions incorrect #1556

Closed
mafrosis opened this issue Sep 19, 2015 · 5 comments
Closed

Building with Makefiles instructions incorrect #1556

mafrosis opened this issue Sep 19, 2015 · 5 comments

Comments

@mafrosis
Copy link

Hi, I'm having to build libsass from source since there's no Debian package as yet, and the instructions on the wiki aren't working for me:

https://github.com/sass/libsass/wiki/Building-with-makefiles

> make -C libsass -j5 sassc
make: *** libsass: No such file or directory.  Stop.

Or:

> make -j5 sassc
make -C sassc
make[1]: *** sassc: No such file or directory.  Stop.
Makefile:283: recipe for target 'sassc/bin/sassc' failed
make: *** [sassc/bin/sassc] Error 2

Running just make creates lib/libsass.a, but I need the compiler too.

I'm using Debian jessie 64-bit. Thanks!

@saper
Copy link
Member

saper commented Sep 19, 2015

Can you check which directory are you in? If you have checked out git repository and didn't cd into it, the make -C libsass command works. -C just means "change into that directory". So, if you are inside of the libsass directory, just do make -j5

If you have more issues, please post a complete log with the git clone and the sequence of commands you are trying.

@mafrosis
Copy link
Author

Yeah I cd'd into libsass first, which explains the No such file of directory. If I run make -j5, all that's produced is lib/libsass.a.

I deleted the libsass directory and re-cloned it - and had another unexpected outcome:

> make -j5 sassc                                                                                                                  5:13:57
mkdir lib
cc -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/cencode.o src/cencode.c
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/ast.o src/ast.cpp
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/base64vlq.o src/base64vlq.cpp
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/bind.o src/bind.cpp
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/color_maps.o src/color_maps.cpp
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/constants.o src/constants.cpp
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/context.o src/context.cpp
In file included from src/context.hpp:18:0,
                 from src/ast.hpp:35,
                 from src/color_maps.cpp:1:
src/plugins.hpp:7:28: fatal error: sass/functions.h: No such file or directory
 #include "sass/functions.h"
                            ^
compilation terminated.
In file included from src/context.hpp:18:0,
                 from src/ast.hpp:35,
                 from src/bind.cpp:2:
src/plugins.hpp:7:28: fatal error: sass/functions.h: No such file or directory
 #include "sass/functions.h"
                            ^
compilation terminated.
In file included from src/context.hpp:18:0,
                 from src/ast.hpp:35,
                 from src/ast.cpp:1:
src/plugins.hpp:7:28: fatal error: sass/functions.h: No such file or directory
 #include "sass/functions.h"
                            ^
compilation terminated.
g++ -Wall -O2 -DLIBSASS_VERSION="\"3.3.0-beta2\"" -std=c++0x -I /opt/libsass/libsass/include -fPIC -fPIC -c -o src/cssize.o src/cssize.cpp
In file included from src/context.hpp:18:0,
                 from src/ast.hpp:35,
                 from src/context.cpp:14:
src/plugins.hpp:7:28: fatal error: sass/functions.h: No such file or directory
 #include "sass/functions.h"
                            ^
compilation terminated.
In file included from src/context.hpp:18:0,
                 from src/ast.hpp:35,
                 from src/cssize.hpp:4,
                 from src/cssize.cpp:5:
src/plugins.hpp:7:28: fatal error: sass/functions.h: No such file or directory
 #include "sass/functions.h"
                            ^
compilation terminated.
Makefile:230: recipe for target 'src/color_maps.o' failed
make: *** [src/color_maps.o] Error 1
make: *** Waiting for unfinished jobs....
Makefile:230: recipe for target 'src/bind.o' failed
make: *** [src/bind.o] Error 1
Makefile:230: recipe for target 'src/ast.o' failed
make: *** [src/ast.o] Error 1
Makefile:230: recipe for target 'src/context.o' failed
make: *** [src/context.o] Error 1
Makefile:230: recipe for target 'src/cssize.o' failed
make: *** [src/cssize.o] Error 1

@saper
Copy link
Member

saper commented Sep 19, 2015

Yeah I cd'd into libsass first, which explains the No such file of directory. If I run make -j5, all that's produced is lib/libsass.a.

This is ok. A static library has been produced correctly.

You can add BUILD=shared parameter if you would like to have libsass.so generated.

It's easy to end up in the chicken-and-egg scenario - libsass needs sassc
for testing, sassc needs libsass to build. That's why your "make -C sassc"
build starts building... libsass.

What you should do is to build libsass first (I think this succeeded on your side)
and then build sassc again.

@mafrosis
Copy link
Author

For whatever reason, I just could not get this to compile. However, I used the instructions from over here with success:

https://github.com/sass/sassc/blob/master/docs/building/unix-instructions.md

@xzyfer
Copy link
Contributor

xzyfer commented Sep 20, 2015

It's entirely likely this documentation is just out of date. The SassC docs are much more recent which would explain why they worked.

There is work to migrate docs from the wiki to the codebase to help keep it up to date #1226.

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

3 participants