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

feat: bzip2 build script default using tarball #95

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

j8xixo12
Copy link
Collaborator

@j8xixo12 j8xixo12 commented Nov 9, 2021

For #92 (comment), changed the build script to use tarball by default, currently bzip2 latest release still using makefile and the issue of clang build fail still exist, so I choice the master as default tarball version, and I tried to download .tar.gz, .tar and .zip, the there are unable to untar except .zip, so I choice zip file to download.

Maybe we can waiting for the next release, the change the default version to latest release.

@j8xixo12 j8xixo12 added the enhancement New feature or request label Nov 9, 2021
@j8xixo12 j8xixo12 requested a review from yungyuc November 9, 2021 04:29
@j8xixo12 j8xixo12 self-assigned this Nov 9, 2021
pkgfull=$pkgname-$pkgbranch
if [ -z "${SYNCGIT}" ]; then
pkgname=bzip2
pkgver=${VERSION:-master}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a released version. (I assume there is one.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest release version is 1.0.8, but this version still using Makefile as build system also having problem with building dynamic file at MacOS, therefore I choose master as default version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we go with a static library?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j8xixo12 Any feedback on this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, you meant solvcon using bzip2 with static library?
if yes maybe I can try it this weekends !

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an urgent issue and not late at all. Yes, something like that, but it is in devenv, we build bzip2 static lib instead of dynamic lib. If the consumer of bzip2 accepts static lib this may be a workaround?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bzip2 also build static library at v.1.0.8 and solvcon can be build with bzip2 static library, but when I ran the test, test failed due to ModuleNotFoundError: No module named '_bz2', it seems python can not find bzip2 with static library ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it is possible to build Python using static bzip2 but you would probably need to look into Python's make file to know how to configure it that way.

@yungyuc yungyuc self-assigned this Nov 9, 2021
unzip ${DEVENVDLROOT}/${pkgfn}
pushd "${pkgname}-${pkgfull}" > /dev/null
# Added -fPIC into bzip2 CLFAGS
sed -i "s/CFLAGS=-Wall*/CFLAGS=-fPIC -Wall/1" Makefile
Copy link
Collaborator Author

@j8xixo12 j8xixo12 Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sed to modify CFLAGS in bzip2’ Makefile, added -fPIC into gcc compile option, then bzip2 static library can be used by python.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

unzip ${DEVENVDLROOT}/${pkgfn}
pushd "${pkgname}-${pkgfull}" > /dev/null
# Added -fPIC into bzip2 CLFAGS
sed -i "s/CFLAGS=-Wall*/CFLAGS=-fPIC -Wall/1" Makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

@yungyuc yungyuc merged commit 20d1532 into solvcon:main Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants