Giter VIP home page Giter VIP logo

Comments (15)

sjackman avatar sjackman commented on June 4, 2024

The file Configure is either not UTF-8, or has incorrect UTF-8 byte sequence. The copyright symbol U+00A9 should be encoding as C2 A9, but is encoded on line 1988 as simply A9. This symbol causes Ruby 2.x to barf, but Ruby 1.x is okay.

        VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

A9 is the correct encoding for © in ISO-8859-1. So, inreplace needs to either autodetect the file encoding, or be told the file encoding. What do you think @adamv @jacknagel @MikeMcQuaid @mistydemeo of specifying the encoding with something like:

inreplace {'file' => 'ISO-8859-1'}, 'foo', 'bar'

from legacy-linuxbrew.

MikeMcQuaid avatar MikeMcQuaid commented on June 4, 2024

Seems reasonable but probably don't need it upstream in Homebrew (unless broken there).

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

@MikeMcQuaid Hi, Mike. This issue is caused by using Ruby 2.0. My understanding is that mxcl/homebrew intends to support Ruby 2.0.

from legacy-linuxbrew.

mistydemeo avatar mistydemeo commented on June 4, 2024

Yes, given that Mavericks ships with ruby 2.0, we're going to have to care about encoding sooner or later.

from legacy-linuxbrew.

jacknagel avatar jacknagel commented on June 4, 2024

Since Ruby 1.8 treats strings (and thus the contents of an IO object) as a bag of bytes, we can preserve the existing behavior by setting the external encoding of the file, and the encodings of the pattern and replacement, to ASCII-8BIT. It's probably a two or three line patch.

If we ever actually need to replace or insert a character that cannot be represented in an ASCII-compatible encoding, then we can work on adding support for specifying encodings on a per-file basis. But I don't see a need to complicate things at the formula-level yet.

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

@dcardosods If possible, I'd recommend installing the openssl library with your native package manager, i.e. apt-get or yum. This commit 70489b7 fixes the invalid byte sequence in UTF-8 error. There's a new error now:

$ brew install openssl
==> Downloading http://openssl.org/source/openssl-1.0.1e.tar.gz
Already downloaded: /home/sjackman/var/cache/Homebrew/openssl-1.0.1e.tar.gz
==> perl ./Configure --prefix=/home/sjackman/local/Cellar/openssl/1.0.1e --opens
==> make depend
fips_ers.o: fips_ers.c ../include/openssl/opensslconf.h
mv: cannot stat `Makefile.new': No such file or directory
make[1]: *** [depend] Error 1

I suspect it's caused by hardcoding the OS as Darwin:
https://github.com/mxcl/homebrew/blob/master/Library/Formula/openssl.rb#L21

Cheers,
Shaun

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

@dcardosods Are you trying to install openssl because another package depends on it? If so, which package?

from legacy-linuxbrew.

dcardosods avatar dcardosods commented on June 4, 2024

So so, I installed rbenv using Homebrew, then i tried to install ruby with rbenv, and openssl is required to do this.
Then I falls in this issue rbenv/ruby-build#377, and tried to install openssl.

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

To install git using Linuxbrew, I had to first brew install openssl curl expat && brew link --force openssl curl.

from legacy-linuxbrew.

OmeGak avatar OmeGak commented on June 4, 2024

I'm was also trying to install openssl both as a requirement or a standalone package and always getting the same error when trying to compile cryptlib. The problem seemed to be with libc (maybe due to an outdated version since I'm on Ubuntu 12.04?). On top of it, in the end, the error message complains about pkgutil, which is obviously not available in my system.

This is the output I was getting:

$ brew install openssl
==> Downloading https://www.openssl.org/source/openssl-1.0.1h.tar.gz
Already downloaded: /home/omegak/.cache/Homebrew/openssl-1.0.1h.tar.gz
==> perl ./Configure --prefix=/home/omegak/.linuxbrew/Cellar/openssl/1.0.1h --openssldir=/home/omegak/.linuxbrew/etc/openssl zlib-dynamic shared enable-cms linux-x86_64
==> make depend
==> make
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/tmp/openssl-loS5/openssl-1.0.1h/crypto'
make: *** [build_crypto] Error 1
Error: No such file or directory - /usr/sbin/pkgutil

I fixed it by:

sudo apt-get install gcc-multilib

Shouldn't this dependency be checked in the formula?

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

On Ubuntu 14.04 I was able to build openssl without installing gcc-multilib. Thanks for the feedback though. I'll keep it in mind if I see a similar error from another user. I don't know why you're seeing the pkgutil error. I haven't seen that before.

from legacy-linuxbrew.

OmeGak avatar OmeGak commented on June 4, 2024

I bumped into another problem trying to compile openssl during make test this time on Ubuntu 12.04. I am getting the following output when installing with verbose:

==> make test
testing...
make[1]: Entering directory `/tmp/openssl-xlis/openssl-1.0.1h/test'
make[2]: Entering directory `/tmp/openssl-xlis/openssl-1.0.1h'
making all in apps...
make[3]: Entering directory `/tmp/openssl-xlis/openssl-1.0.1h/apps'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/openssl-xlis/openssl-1.0.1h/apps'
make[2]: Leaving directory `/tmp/openssl-xlis/openssl-1.0.1h'
../util/shlib_wrap.sh ./destest
ERROR: ld.so: object '../util/../libcrypto.so.1.0.0' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '../util/../libssl.so.1.0.0' from LD_PRELOAD cannot be preloaded: ignored.
./destest: 1: ./destest: h@8: not found
./destest: 1: ./destest: 0: not found
./destest: 1: ./destest: �����T�T�@T�@DD�P�td��O�O@�O@: not found
./destest: 1: ./destest: �����/lib64/ld-linux-x86-64.so.2���GNU������GNU�zt.~�N�S@��: not found
./destest: 2: ./destest: �������������: not found
./destest: 2: ./destest: �qX��������e��B�����W����������������������0���: not found
./destest: 1: ./destest: �����8g: not found
./destest: 1: ./destest: �ELF����: not found
./destest: 3: ./destest: Syntax error: ")" unexpected
make[1]: *** [test_des] Error 2
make[1]: Leaving directory `/tmp/openssl-xlis/openssl-1.0.1h/test'
make: *** [tests] Error 2
Error: No such file or directory - /usr/sbin/pkgutil

I've tried compiling the same release manually and it works just fine, so somehow brew is fiddling with it in some way beyond my comprehension. Any idea what could be the problem?

from legacy-linuxbrew.

sjackman avatar sjackman commented on June 4, 2024

I have no idea what's going on here. Do you see this error only with openssl or with other packages as well?

from legacy-linuxbrew.

OmeGak avatar OmeGak commented on June 4, 2024

Only with openssl so far.

from legacy-linuxbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.