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

OSH build problems on multiple platforms #16

Open
andychu opened this Issue Jul 24, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@andychu
Contributor

andychu commented Jul 24, 2017

Most of these are probably because I froze pyconfig.h with Alpine Linux / gcc / musl libc.

TODO: Run on faster virtualized armhf box!

@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 7, 2017

Contributor

Fixed RedHat / CentOS issue here: a8cd603

Not able to repro Arch Linux error.

Contributor

andychu commented Sep 7, 2017

Fixed RedHat / CentOS issue here: a8cd603

Not able to repro Arch Linux error.

@obestwalter

This comment has been minimized.

Show comment
Hide comment
@obestwalter

obestwalter Sep 7, 2017

Hi @andychu - thanks for following this up. Good to here that the arch problem dissolved.

obestwalter commented Sep 7, 2017

Hi @andychu - thanks for following this up. Good to here that the arch problem dissolved.

@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 7, 2017

Contributor

@obestwalter I'm not sure what happened since I didn't change anything. I tested with this image:

https://app.vagrantup.com/archlinux/boxes/archlinux

It's possible you might still have the error on your box, but I guess we can see when I make a new release (should be soon.)

Contributor

andychu commented Sep 7, 2017

@obestwalter I'm not sure what happened since I didn't change anything. I tested with this image:

https://app.vagrantup.com/archlinux/boxes/archlinux

It's possible you might still have the error on your box, but I guess we can see when I make a new release (should be soon.)

@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 8, 2017

Contributor

Works on ubuntu32 VM, but fails on Raspberry Pi Zero with:

$ time make
build/compile.sh build-opt _build/oil/ovm _build/oil/module_init.c _build/oil/main_name.c _build/oil/c-module-srcs.txt
~/src/oil-0.1.alpha1/Python-2.7.13 ~/src/oil-0.1.alpha1
/tmp/ccXch6z6.s: Assembler messages:
/tmp/ccXch6z6.s:26: Error: bad instruction `fnstcw [sp,#6]'
/tmp/ccXch6z6.s:44: Error: bad instruction `fldcw [sp,#6]'

real	16m1.890s
user	15m33.230s
sys	0m14.390s
~/src/oil-0.1.alpha1
cat _build/oil/ovm _build/oil/bytecode.zip > _bin/oil.ovm
cat: _build/oil/ovm: No such file or directory
Makefile:281: recipe for target '_bin/oil.ovm' failed
make: *** [_bin/oil.ovm] Error 1
make: *** Deleting file '_bin/oil.ovm'

real	16m2.092s
user	15m33.320s
sys	0m14.450s
Contributor

andychu commented Sep 8, 2017

Works on ubuntu32 VM, but fails on Raspberry Pi Zero with:

$ time make
build/compile.sh build-opt _build/oil/ovm _build/oil/module_init.c _build/oil/main_name.c _build/oil/c-module-srcs.txt
~/src/oil-0.1.alpha1/Python-2.7.13 ~/src/oil-0.1.alpha1
/tmp/ccXch6z6.s: Assembler messages:
/tmp/ccXch6z6.s:26: Error: bad instruction `fnstcw [sp,#6]'
/tmp/ccXch6z6.s:44: Error: bad instruction `fldcw [sp,#6]'

real	16m1.890s
user	15m33.230s
sys	0m14.390s
~/src/oil-0.1.alpha1
cat _build/oil/ovm _build/oil/bytecode.zip > _bin/oil.ovm
cat: _build/oil/ovm: No such file or directory
Makefile:281: recipe for target '_bin/oil.ovm' failed
make: *** [_bin/oil.ovm] Error 1
make: *** Deleting file '_bin/oil.ovm'

real	16m2.092s
user	15m33.320s
sys	0m14.450s
@acg

This comment has been minimized.

Show comment
Hide comment
@acg

acg Sep 13, 2017

I also reported this issue but have since fixed it. Turns out changing your mind about prefix was the problem:

./configure
make
./configure --prefix ~
make
./install
osh  # aborts
# in a clean directory
./configure --prefix ~
make
./install
osh  # works

acg commented Sep 13, 2017

I also reported this issue but have since fixed it. Turns out changing your mind about prefix was the problem:

./configure
make
./configure --prefix ~
make
./install
osh  # aborts
# in a clean directory
./configure --prefix ~
make
./install
osh  # works
@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 13, 2017

Contributor

Ah that should work though, so it's still a bug! I'll test it out.

Contributor

andychu commented Sep 13, 2017

Ah that should work though, so it's still a bug! I'll test it out.

@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 14, 2017

Contributor

@acg I'm having trouble reproducing this in the archlinux/archlinux Vagrant VM (although I don't think it should have anything to do with Arch if the bug is about changing --prefix.

The second you typed 'make', did it build anything? For me it said

make: Nothing to be done for 'default'.

I can imagine there is a bug if the Makefile dependencies aren't right though.

... output of make ...
real    0m35.489s
user    0m33.984s
sys     0m1.465s
~/src/oil-0.1.0
cat _build/oil/ovm _build/oil/bytecode.zip > _bin/oil.ovm
chmod +x _bin/oil.ovm

[vagrant@archlinux oil-0.1.0]$ ./configure --prefix ~
m./configure: Wrote _build/detected-config.sh and _build/detected-config.h

[vagrant@archlinux oil-0.1.0]$ make
make: Nothing to be done for 'default'.

[vagrant@archlinux oil-0.1.0]$ ./install 
Installing to /home/vagrant/bin/oil.ovm
[vagrant@archlinux oil-0.1.0]$ osh
osh$ ^CCtrl-C
Contributor

andychu commented Sep 14, 2017

@acg I'm having trouble reproducing this in the archlinux/archlinux Vagrant VM (although I don't think it should have anything to do with Arch if the bug is about changing --prefix.

The second you typed 'make', did it build anything? For me it said

make: Nothing to be done for 'default'.

I can imagine there is a bug if the Makefile dependencies aren't right though.

... output of make ...
real    0m35.489s
user    0m33.984s
sys     0m1.465s
~/src/oil-0.1.0
cat _build/oil/ovm _build/oil/bytecode.zip > _bin/oil.ovm
chmod +x _bin/oil.ovm

[vagrant@archlinux oil-0.1.0]$ ./configure --prefix ~
m./configure: Wrote _build/detected-config.sh and _build/detected-config.h

[vagrant@archlinux oil-0.1.0]$ make
make: Nothing to be done for 'default'.

[vagrant@archlinux oil-0.1.0]$ ./install 
Installing to /home/vagrant/bin/oil.ovm
[vagrant@archlinux oil-0.1.0]$ osh
osh$ ^CCtrl-C
@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Sep 14, 2017

Contributor

Nevermind I reproduced it.

The issue is that both make and install steps read $PREFIX from _build/detected-config.sh. And if they disagree then it crashes. Doh!

I will have to think about this. I think it might be the result of some "optimization" I did over the autoconf model. In autoconf the Makefile contains both the build and install steps, and is generated all at once.

Thanks for the report.

$ PATH=~/bin:$PATH
[vagrant@archlinux oil-0.1.0]$ osh
osh: Modules/main.c:347: Ovm_Main: Assertion `sts != -1' failed.
Aborted (core dumped)
Contributor

andychu commented Sep 14, 2017

Nevermind I reproduced it.

The issue is that both make and install steps read $PREFIX from _build/detected-config.sh. And if they disagree then it crashes. Doh!

I will have to think about this. I think it might be the result of some "optimization" I did over the autoconf model. In autoconf the Makefile contains both the build and install steps, and is generated all at once.

Thanks for the report.

$ PATH=~/bin:$PATH
[vagrant@archlinux oil-0.1.0]$ osh
osh: Modules/main.c:347: Ovm_Main: Assertion `sts != -1' failed.
Aborted (core dumped)
@jshort

This comment has been minimized.

Show comment
Hide comment
@jshort

jshort Jan 31, 2018

Building python failed on MacOS Sierra:

/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
gcc  -u _PyMac_Error -o python.exe \
			Modules/python.o \
			libpython2.7.a -ldl  -framework CoreFoundation
./python.exe -E -S -m sysconfig --generate-posix-vars ;\
	if test $? -ne 0 ; then \
		echo "generate-posix-vars failed" ; \
		rm -f ./pybuilddir.txt ; \
		exit 1 ; \
	fi
running build
running build_ext
building dbm using ndbm
Traceback (most recent call last):
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 2262, in <module>
    main()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 2257, in main
    'Lib/smtpd.py']
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 182, in build_extensions
    missing = self.detect_modules()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 1699, in detect_modules
    addMacExtension('_CF', core_kwds, ['cf/pycfbridge.c'])
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 1690, in addMacExtension
    raise RuntimeError("%s not found" % name)
RuntimeError: _CF not found
make: *** [sharedmods] Error 1

jshort commented Jan 31, 2018

Building python failed on MacOS Sierra:

/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
gcc  -u _PyMac_Error -o python.exe \
			Modules/python.o \
			libpython2.7.a -ldl  -framework CoreFoundation
./python.exe -E -S -m sysconfig --generate-posix-vars ;\
	if test $? -ne 0 ; then \
		echo "generate-posix-vars failed" ; \
		rm -f ./pybuilddir.txt ; \
		exit 1 ; \
	fi
running build
running build_ext
building dbm using ndbm
Traceback (most recent call last):
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 2262, in <module>
    main()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 2257, in main
    'Lib/smtpd.py']
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 182, in build_extensions
    missing = self.detect_modules()
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 1699, in detect_modules
    addMacExtension('_CF', core_kwds, ['cf/pycfbridge.c'])
  File "/Users/jwshort/gitworkspaces/oil/Python-2.7.13/setup.py", line 1690, in addMacExtension
    raise RuntimeError("%s not found" % name)
RuntimeError: _CF not found
make: *** [sharedmods] Error 1
@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Feb 1, 2018

Contributor

@jshort What command did you run? Let's follow up on issue #70, which I created since OS X is different than other platforms (no free testing environment AFAICT).

Contributor

andychu commented Feb 1, 2018

@jshort What command did you run? Let's follow up on issue #70, which I created since OS X is different than other platforms (no free testing environment AFAICT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment