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 failure with 2.3.10: prototypes.h not found #107

Closed
jubalh opened this issue May 2, 2022 · 14 comments
Closed

Build failure with 2.3.10: prototypes.h not found #107

jubalh opened this issue May 2, 2022 · 14 comments

Comments

@jubalh
Copy link
Contributor

jubalh commented May 2, 2022

With 2.3.10 I get:

[   33s] In file included from SQLBrowseConnect.c:14:
[   33s] driver.h:34:10: fatal error: prototypes.h: No such file or directory
[   33s]    34 | #include "prototypes.h"
[   33s]       |          ^~~~~~~~~~~~~~
[   33s] compilation terminated.
[   33s] make[3]: *** [Makefile:743: SQLBrowseConnect.lo] Error 1
[   33s] make[3]: Leaving directory '/home/abuild/rpmbuild/BUILD/unixODBC-2.3.10/Drivers/template'
[   33s] make[3]: Entering directory '/home/abuild/rpmbuild/BUILD/unixODBC-2.3.10/Drivers/template'
[   33s] /usr/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../include -I.    -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -pthread -c -o SQLAllocStmt.lo SQLAllocStmt.c
[   33s] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I. -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -pthread -c SQLAllocStmt.c  -fPIC -DPIC -o .libs/SQLAllocStmt.o
[   33s] In file included from SQLAllocStmt.c:14:
[   33s] driver.h:34:10: fatal error: prototypes.h: No such file or directory
[   33s]    34 | #include "prototypes.h"
[   33s]       |          ^~~~~~~~~~~~~~
[   33s] compilation terminated.
[   33s] make[3]: *** [Makefile:743: SQLAllocStmt.lo] Error 1
@lurcher
Copy link
Owner

lurcher commented May 2, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 2, 2022

I can confirm that dc160b3 fixes this.

But now we have one problem :)

It seems you took this commit and added it to the tarball at: ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.10.tar.gz
But the GitHub tag of 2.3.10 points to commit f9e77f8

Which will result in the autogenerated tarball of 2.3.10 that is available on GH https://github.com/lurcher/unixODBC/archive/refs/tags/2.3.10.tar.gz to have different content that the one on the official website.

Now we could argue that the official website is the goto location for the tarball anyways. Which I can agree on.

But still the git tag points to another commit thatn the tarball actually contains.

Personally I don't care. And I think/hope other users can find this information here.
Just wanted to mention this :)

@lurcher
Copy link
Owner

lurcher commented May 2, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 2, 2022

Alright. I'll close this issue since the reported problem is fixed.
Thank you!

@jubalh jubalh closed this as completed May 2, 2022
@lurcher
Copy link
Owner

lurcher commented May 4, 2022 via email

@lurcher
Copy link
Owner

lurcher commented May 4, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 4, 2022

I don't think you need to include that.
It's autogenerated by autconf/configure AFAIK.

You won't have it in the GitHub created tarball.

If people decide to use the autogenerated tarball they need to run autoreconf -fi manually.

Some projects upload an additional upload (like you do on your website) that is created (like you did, with probably make dist) and doesn't need this step. GitHub has an option in the release page where you can upload it.

As an example see: https://github.com/profanity-im/profanity/releases/tag/0.12.1
Source code (tar.gz) is the autogenerated tarball by GitHub.
Source code (tar.gz) is the manually created + uploaded by author.

@jubalh
Copy link
Contributor Author

jubalh commented May 4, 2022

I would say 37c45a6 is not correct.

What exactly are you trying to solve? If the problem was that in the GH tarball there wasn't a config.h then my previous comment should explain this.

@lurcher
Copy link
Owner

lurcher commented May 4, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 4, 2022

And why do you think it should include it?

I think I tried to explain in #107 (comment) what's the correct way.
Is there something unclear where I should expand the explanation?

Feel free to ask away.

@lurcher
Copy link
Owner

lurcher commented May 4, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 4, 2022

So I guess I need to know why 37c45a6
is wrong and what you suggest to fix it, and then I will try and get it
all to line up.

Honestly I don't quite remember why all the projects omit this file to be tracked in git. AFAIK the main (only?) reason is that it's generated from something (either during make dist or autoreconf). And thus doesn't need to be tracked.

What you need to do in my opinion is the following:

  1. git revert 37c45a6cfa48677f8281d2f852cd709170d06223
    to readd the file to gitignore.

  2. git tag 2.3.11; git push; git push --tags
    To tag this commit ad 2.3.11. All your other changes are still okay. So git will include the protoype fixes and the config.h.in will be as before.

  3. Create your tarball in the way that you used to for uploading on your website

  4. upload it on your website

  5. go to github at https://github.com/lurcher/unixODBC/releases then you can click on "new release" (or something similar, i cant see this since i dont have rights).
    there you can choose a tag for this release and you select 2.3.11.
    at the bottom of this site there is something like "attach any files". and there you just attach the tarball that you generated (and uploaded to your website).

the result will be that your tarball will be available on both your website and on the github release page and that their checksum will be the same.
ADDITIONALLY there will be the autogenerated tarball created by github. whoever uses this one will have to call autoreconf -fi manually to get the config.h.in.

But the tarball that you uploaded will be highlighted and people will use that on.
The uploaded tarballs by the maintainer are generally seen as the one to use. And the one generated by github is unreliable.

@lurcher
Copy link
Owner

lurcher commented May 4, 2022 via email

@jubalh
Copy link
Contributor Author

jubalh commented May 4, 2022

Everything looks perfect!

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue May 6, 2022
https://build.opensuse.org/request/show/974978
by user jubalh + dimstar_suse
- Update to 2.3.11:
  * Add missing files to 2.3.10
- See lurcher/unixODBC#107
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

2 participants