• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sass / libsass / 4586
85%

Build:
DEFAULT BRANCH: master
Ran 14 Nov 2018 10:21PM UTC
Jobs 3
Files 126
Run time 21min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4586

push

travis-ci

xzyfer
Remove -undefined error, --no-undefined LDFLAGS

As far as I can tell, `-undefined error` was introduced mistakenly
to replace `--no-undefined`, which doesn't work Apple's cctools' ld.
The problem is, `-undefined error` _only_ works on cctools' ld.
This is much less noticeable than the original problem, because GCC's ld
won't complain, it just won't do the right thing. The Solaris linker, on
the other hand, _will_ complain:

    ld: fatal: file error: open failed: No such file or directory

This is a misleading error message, but what it is actually telling us
is that it can't open a file named "error", which it tries to do because
it doesn't recognise "-undefined" as an option that can take an
argument.

We can demonstrate that this doesn't have the desired effect in GCC too.
Consider this a C source file, main.c, containing the following:

    extern void hello(void);

    int main(void) {
        hello();
    }

If we compile this using the command `gcc -fPIC -shared main.c`, we
will get no indication that the `hello` function we are trying to call
has never been defined. This is for, as the GCC documentation puts it,
"historial reasons".

If we don't want this, we can pass `--no-undefined` to the linker, like
this:

    gcc -fPIC -shared -Wl,--no-undefined main.c

This is what the Makefile used to do, before being changed. Running this
command will produce an error informing us of our mistake:

    /tmp/ccGRJkJ8.o: In function `main':
    main.c:(.text+0xc): undefined reference to `hello'
    collect2: error: ld returned 1 exit status

However, trying to use the cctools' ld's equivalent reveals that GCC's
ld definitely does not interpret it the same way. This command will
succeed, just the same as the one where we specified no explicit linker
options at all. I don't want to speculate on what effect, if any,
`-undefined error` has on GCC's ld, but it definitely isn't the right
one.

After some discussion, we've decided it's best to just remove these
flags.

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4586.1 (AUTOTOOLS=no COVERAGE=yes BUILD=static) 14 Nov 2018 10:21PM UTC 0
86.29
Travis Job 4586.1
3 4586.3 (AUTOTOOLS=no COVERAGE=yes BUILD=static) 14 Nov 2018 10:30PM UTC 0
0.0
Travis Job 4586.3
6 4586.6 (AUTOTOOLS=no COVERAGE=yes BUILD=static) 14 Nov 2018 10:42PM UTC 0
86.28
Travis Job 4586.6
Source Files on build 4586
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4586
  • a8273fc6 on github
  • Prev Build on master (#4580)
  • Next Build on master (#4588)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc