[GH-ISSUE #265] Possible typos in makefiles #213

Closed
opened 2026-05-05 11:56:18 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @utelle on GitHub (Jan 15, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/265

Originally assigned to: @jmcnamara on GitHub.

Today I tried to update my clone of libxlsxwriter to your latest master. While trying to track down why my travis CI fails for the test_valgrind cases (I get duplicate symbols on linking, and I would be grateful if could take a look why this might be so - TIA), I found a few possible typos in your makefiles:

  • line 14 in Makefile and src/Makefile defines symbol DESTIDR - shouldn't that be DESTDIR?
  • line 49 in Makefile in the clean target uses symbol USE_STANDARD_TMPFILE to clean the minizip files - shouldn't that be symbol USE_SYSTEM_MINIZIP?
Originally created by @utelle on GitHub (Jan 15, 2020). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/265 Originally assigned to: @jmcnamara on GitHub. Today I tried to update my clone of libxlsxwriter to your latest master. While trying to track down why my travis CI fails for the [test_valgrind](https://travis-ci.org/utelle/libxlsxwriter/jobs/637393795?utm_medium=notification&utm_source=github_status) cases (_I get duplicate symbols on linking, and I would be grateful if could take a look why this might be so - TIA_), I found a few possible typos in your makefiles: - line 14 in `Makefile` and `src/Makefile` defines symbol `DESTIDR` - shouldn't that be `DESTDIR`? - line 49 in `Makefile` in the `clean` target uses symbol `USE_STANDARD_TMPFILE` to clean the minizip files - shouldn't that be symbol `USE_SYSTEM_MINIZIP`?
gitea-mirror 2026-05-05 11:56:18 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jmcnamara commented on GitHub (Jan 15, 2020):

Hi,

Thanks those are both typos/bugs.

I had a quick look at your fork and I don't see anything that would cause that link issue. I'll look at it in more detail and let you know.

<!-- gh-comment-id:574657532 --> @jmcnamara commented on GitHub (Jan 15, 2020): Hi, Thanks those are both typos/bugs. I had a quick look at your fork and I don't see anything that would cause that link issue. I'll look at it in more detail and let you know.
Author
Owner

@utelle commented on GitHub (Jan 15, 2020):

I had a quick look at your fork and I don't see anything that would cause that link issue. I'll look at it in more detail and let you know.

Great. Thanks. Most likely it is some small an subtle issue.

<!-- gh-comment-id:574660120 --> @utelle commented on GitHub (Jan 15, 2020): > I had a quick look at your fork and I don't see anything that would cause that link issue. I'll look at it in more detail and let you know. Great. Thanks. Most likely it is some small an subtle issue.
Author
Owner

@jmcnamara commented on GitHub (Jan 15, 2020):

I ran the test against your branch/fork and I didn't see the issue. Maybe just resubmit/rerun the test by creating a new branch or pushing a minor change.

<!-- gh-comment-id:574686346 --> @jmcnamara commented on GitHub (Jan 15, 2020): I ran the test against your branch/fork and I didn't see the issue. Maybe just resubmit/rerun the test by creating a new branch or pushing a minor change.
Author
Owner

@jmcnamara commented on GitHub (Jan 15, 2020):

@sjmulder on the DESTIDR typo:

https://github.com/jmcnamara/libxlsxwriter/blob/master/Makefile#L14

<!-- gh-comment-id:574696104 --> @jmcnamara commented on GitHub (Jan 15, 2020): @sjmulder on the DESTIDR typo: https://github.com/jmcnamara/libxlsxwriter/blob/master/Makefile#L14
Author
Owner

@sjmulder commented on GitHub (Jan 15, 2020):

@jmcnamara yes that's a typo - I can fix it or someone else can. But it doesn't break anything as-as since the line is a no-op intended for documentation (or easy tweaking).

<!-- gh-comment-id:574699700 --> @sjmulder commented on GitHub (Jan 15, 2020): @jmcnamara yes that's a typo - I can fix it or someone else can. But it doesn't break anything as-as since the line is a no-op intended for documentation (or easy tweaking).
Author
Owner

@utelle commented on GitHub (Jan 15, 2020):

I ran the test against your branch/fork and I didn't see the issue. Maybe just resubmit/rerun the test by creating a new branch or pushing a minor change.

I restarted the failing job, but it failed again. Only the test_valgrind part fails, that is:

env:  - CFLAGS='-Werror'
script:  - make test_valgrind USE_DOUBLE_FUNCTION=1 V=1

I'm at a loss why the link step fails with duplicate symbols.

<!-- gh-comment-id:574699851 --> @utelle commented on GitHub (Jan 15, 2020): > I ran the test against your branch/fork and I didn't see the issue. Maybe just resubmit/rerun the test by creating a new branch or pushing a minor change. I restarted the failing job, but it failed again. Only the `test_valgrind` part fails, that is: ``` env: - CFLAGS='-Werror' script: - make test_valgrind USE_DOUBLE_FUNCTION=1 V=1 ``` I'm at a loss why the link step fails with duplicate symbols.
Author
Owner

@utelle commented on GitHub (Jan 15, 2020):

As recommended in the error message I added the linker option -v (see verbose test_valgrind). This revealed that the object file for utility.c is contained 2 times in the library file, as utility.o and as utility.c.o. This seems to be a side effect of the test_cmake script. Not sure what's going on here.

<!-- gh-comment-id:574861194 --> @utelle commented on GitHub (Jan 15, 2020): As recommended in the error message I added the linker option `-v` (see [verbose test_valgrind](https://travis-ci.org/utelle/libxlsxwriter/jobs/637633297?utm_medium=notification&utm_source=github_status)). This revealed that the object file for `utility.c` is contained 2 times in the library file, as `utility.o` and as `utility.c.o`. This seems to be a side effect of the `test_cmake` script. Not sure what's going on here.
Author
Owner

@utelle commented on GitHub (Jan 15, 2020):

As an attempt of a workaround I moved the test_cmake to the end of the script list. This helped a bit, but the second test_valgrind run still fails (see travis CI).

<!-- gh-comment-id:574876417 --> @utelle commented on GitHub (Jan 15, 2020): As an attempt of a workaround I moved the `test_cmake` to the end of the script list. This helped a bit, but the second `test_valgrind` run still fails (see [travis CI](https://travis-ci.org/utelle/libxlsxwriter?utm_medium=notification&utm_source=github_status)).
Author
Owner

@jmcnamara commented on GitHub (Jan 16, 2020):

I was able to reproduce this. There is a memory leak running under gcc. It is a little odd but at least I can reproduce it. I'm working on a fix.

<!-- gh-comment-id:574920293 --> @jmcnamara commented on GitHub (Jan 16, 2020): I was able to reproduce this. There is a memory leak running under gcc. It is a little odd but at least I can reproduce it. I'm working on a fix.
Author
Owner

@utelle commented on GitHub (Jan 16, 2020):

Thanks for looking into this.

Moving the test_cmake to the end of the script list is in fact only a workaround. At least in my branch the problem arises from cmake using extension *.c.o for object files instead of just *.o and adding those files to the existing library file. AFAICT this behaviour is also shown in your repository. Strange enough it does not result in errors for your CI runs.

<!-- gh-comment-id:575108505 --> @utelle commented on GitHub (Jan 16, 2020): Thanks for looking into this. Moving the `test_cmake` to the end of the script list is in fact only a workaround. At least in my branch the problem arises from cmake using extension `*.c.o` for object files instead of just `*.o` and adding those files to the existing library file. AFAICT this behaviour is also shown in your repository. Strange enough it does not result in errors for your CI runs.
Author
Owner

@jmcnamara commented on GitHub (Jan 16, 2020):

There are 2 issues.

  1. The CMake issue, that I don't understand but will look into. Moving it to the end or adding a "make clean" after it runs should be okay.
  2. There is a valgrind warning that only occurs for some gcc/valgrind combination.

There is a fix for the valgrind warning here: 335548e77b

However, I haven't bottomed out on whether this is a valid warning/error/fix. I'm still looking into it.

<!-- gh-comment-id:575112621 --> @jmcnamara commented on GitHub (Jan 16, 2020): There are 2 issues. 1. The CMake issue, that I don't understand but will look into. Moving it to the end or adding a "make clean" after it runs should be okay. 2. There is a valgrind warning that only occurs for some gcc/valgrind combination. There is a fix for the valgrind warning here: https://github.com/jmcnamara/libxlsxwriter/commit/335548e77b8425a6fa3611315ab9ba8e3c4da0cb However, I haven't bottomed out on whether this is a valid warning/error/fix. I'm still looking into it.
Author
Owner

@jmcnamara commented on GitHub (Jan 19, 2020):

I've fixed the typos and valgrind issue on master. Thanks for the report.

<!-- gh-comment-id:576026164 --> @jmcnamara commented on GitHub (Jan 19, 2020): I've fixed the typos and valgrind issue on master. Thanks for the report.
Author
Owner

@utelle commented on GitHub (Jan 20, 2020):

Thanks again for your excellent support.

With your modifications my library variant now passes again all CI tests.

BTW, maybe you should consider to edit the release titles of your release 0.9.2 to 0.9.4, since they reference January 2019 instead of January 2020.

<!-- gh-comment-id:576244215 --> @utelle commented on GitHub (Jan 20, 2020): Thanks again for your excellent support. With your modifications my library variant now passes again all CI tests. BTW, maybe you should consider to edit the release titles of your release 0.9.2 to 0.9.4, since they reference January 2019 instead of January 2020.
Author
Owner

@jmcnamara commented on GitHub (Jan 20, 2020):

BTW, maybe you should consider to edit the release titles of your release 0.9.2 to 0.9.4, since they reference January 2019 instead of January 2020.

Lol. Thanks.

Btw, I've started to look at adding a third party sprintf lib to fix #64. From a code point of view my preference is for fpconv instead of emyg_dtoa but I'll test both.

<!-- gh-comment-id:576248157 --> @jmcnamara commented on GitHub (Jan 20, 2020): > BTW, maybe you should consider to edit the release titles of your release 0.9.2 to 0.9.4, since they reference January 2019 instead of January 2020. Lol. Thanks. Btw, I've started to look at adding a third party sprintf lib to fix #64. From a code point of view my preference is for fpconv instead of emyg_dtoa but I'll test both.
Author
Owner

@utelle commented on GitHub (Jan 20, 2020):

I will take a look at fpconv again. As mentioned in my post of August 10, 2017 fpconv is based on the same algorithm as emyg_dtoa. So in principle it should work equally well (although according to the benchmark it is slower by a factor of about 2).

Nevertheless, my adjusted version of emyg_dtoa obviously seems to work properly, otherwise my library variant wouldn't pass all the extensive CI tests of libxlsxwriter.

<!-- gh-comment-id:576261353 --> @utelle commented on GitHub (Jan 20, 2020): I will take a look at `fpconv` again. As mentioned in my [post of August 10, 2017](https://github.com/jmcnamara/libxlsxwriter/issues/64#issuecomment-321398715) `fpconv` is based on the same algorithm as `emyg_dtoa`. So in principle it should work equally well (although according to the benchmark it is slower by a factor of about 2). Nevertheless, my adjusted version of `emyg_dtoa` obviously seems to work properly, otherwise my library variant wouldn't pass all the extensive CI tests of libxlsxwriter.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#213
No description provided.