Unable to install / build docx module

377 views
Skip to first unread message

MH

unread,
Mar 5, 2020, 10:44:07 PM3/5/20
to Django users
Hi there

I need to use the docx module, but I am unable to install it. Somehow I got it to work previously, but not after a change from the runserver to gunicorn. Therefore, perhaps someone can tell me how to proceed.

volume1/\@appstore/py3k/usr/local/bin/pip3 install docx
Defaulting to user installation because normal site-packages is not writeable
Collecting docx
 
Downloading docx-0.2.4.tar.gz (54 kB)
     
|████████████████████████████████| 54 kB 276 kB/s
Collecting lxml
 
Using cached lxml-4.5.0.tar.gz (4.5 MB)
Collecting Pillow>=2.0
 
Using cached Pillow-7.0.0.tar.gz (38.2 MB)
Building wheels for collected packages: docx, lxml, Pillow
 
Building wheel for docx (setup.py) ... done
 
Created wheel for docx: filename=docx-0.2.4-py3-none-any.whl size=53927 sha256=d6ff3d9f2549fe9a504c5152c9f0e2a0fb1882dd288c87314337ed1355b6b46b
 
Stored in directory: /volume1/homes/admin/.cache/pip/wheels/8c/80/1a/d0d60c7619a305c7101d546faf7fa43161eeeb60e64a1cedaf
 
Building wheel for lxml (setup.py) ... error
  ERROR
: Command errored out with exit status 1:
   command
: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"'; __file__='"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /opt/tmp/pip-wheel-5ghfvs17
       cwd
: /opt/tmp/pip-install-8yk71h5u/lxml/
 
Complete output (90 lines):
 
Building lxml version 4.5.0.
 
Building without Cython.
  ERROR
: b'/bin/sh: xslt-config: command not found\n'
 
** make sure the development packages of libxml2 and libxslt are installed **
 
 
Using build configuration of libxslt
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build
/lib.linux-armv7l-3.5
  creating build
/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/__init__.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/usedoctest.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/builder.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/pyclasslookup.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/sax.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/doctestcompare.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/cssselect.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/_elementpath.py -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/ElementInclude.py -> build/lib.linux-armv7l-3.5/lxml
  creating build
/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/__init__.py -> build/lib.linux-armv7l-3.5/lxml/includes
  creating build
/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/__init__.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/usedoctest.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/soupparser.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/builder.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/diff.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/defs.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/html5parser.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/_setmixin.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/formfill.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/clean.py -> build/lib.linux-armv7l-3.5/lxml/html
  copying src
/lxml/html/_html5builder.py -> build/lib.linux-armv7l-3.5/lxml/html
  creating build
/lib.linux-armv7l-3.5/lxml/isoschematron
  copying src
/lxml/isoschematron/__init__.py -> build/lib.linux-armv7l-3.5/lxml/isoschematron
  copying src
/lxml/etree.h -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/etree_api.h -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/lxml.etree.h -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-3.5/lxml
  copying src
/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/config.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/uri.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/tree.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/__init__.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-3.5/lxml/includes
  copying src
/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-3.5/lxml/includes
  creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources
  creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/rng
  copying src
/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/rng
  creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
  copying src
/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
  copying src
/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
  creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  running build_ext
  building
'lxml.etree' extension
  creating build
/temp.linux-armv7l-3.5
  creating build
/temp.linux-armv7l-3.5/src
  creating build
/temp.linux-armv7l-3.5/src/lxml
 
/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -mhard-float -mfpu=vfpv3-d16 -march=armv7-a -mcpu=marvell-pj4 -mtune=marvell-pj4 -DSYNOPLAT_F_ARMV7 -O2 -fno-diagnostics-show-caret -Wno-unused-local-typedefs -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=32 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/volume1/@appstore/py3k/usr/local/include/python3.5m -c src/lxml/etree.c -o build/temp.linux-armv7l-3.5/src/lxml/etree.o -w
  unable to execute
'/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc': No such file or directory
 
Compile failed: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
  creating opt
  creating opt
/tmp
  cc
-I/usr/include/libxml2 -c /opt/tmp/xmlXPathInitw7n63wlz.c -o opt/tmp/xmlXPathInitw7n63wlz.o
  unable to execute
'cc': No such file or directory
 
*********************************************************************************
 
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
 
*********************************************************************************
  error
: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
 
----------------------------------------
  ERROR
: Failed building wheel for lxml
 
Running setup.py clean for lxml
 
Building wheel for Pillow (setup.py) ... error
  ERROR
: Command errored out with exit status 1:
   command
: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/tmp/pip-install-8yk71h5u/Pillow/setup.py'"'"'; __file__='"'"'/opt/tmp/pip-install-8yk71h5u/Pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /opt/tmp/pip-wheel-ttmrfcwf
       cwd
: /opt/tmp/pip-install-8yk71h5u/Pillow/
 
Complete output (172 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build
/lib.linux-armv7l-3.5
  creating build
/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PdfParser.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/BlpImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/WalImageFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/__init__.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageFont.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/_binary.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/FontFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PyAccess.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/Image.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/TiffTags.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/features.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ExifTags.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageColor.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageOps.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageWin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageFilter.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/_util.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageMorph.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GdImageFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageTk.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/_version.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageQt.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageSequence.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/JpegPresets.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImagePalette.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PSDraw.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageTransform.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageGrab.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageStat.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/_tkinter_finder.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageMode.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageMath.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageDraw.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/TarIO.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImagePath.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageChops.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/__main__.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageCms.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ImageShow.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/ContainerIO.py -> build/lib.linux-armv7l-3.5/PIL
  copying src
/PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
  running egg_info
  writing dependency_links to src
/Pillow.egg-info/dependency_links.txt
  writing src
/Pillow.egg-info/PKG-INFO
  writing top
-level names to src/Pillow.egg-info/top_level.txt
  reading manifest file
'src/Pillow.egg-info/SOURCES.txt'
  reading manifest
template 'MANIFEST.in'
  warning
: no files found matching '*.c'
  warning
: no files found matching '*.h'
  warning
: no files found matching '*.sh'
  warning
: no previously-included files found matching '.appveyor.yml'
  warning
: no previously-included files found matching '.coveragerc'
  warning
: no previously-included files found matching '.codecov.yml'
  warning
: no previously-included files found matching '.editorconfig'
  warning
: no previously-included files found matching '.readthedocs.yml'
  warning
: no previously-included files found matching 'azure-pipelines.yml'
  warning
: no previously-included files matching '.git*' found anywhere in distribution
  warning
: no previously-included files matching '*.pyc' found anywhere in distribution
  warning
: no previously-included files matching '*.so' found anywhere in distribution
 
no previously-included directories found matching '.azure-pipelines'
 
no previously-included directories found matching '.travis'
  writing manifest file
'src/Pillow.egg-info/SOURCES.txt'
  running build_ext
 
 
 
The headers or library files could not be found for zlib,
  a required dependency
when compiling Pillow from source.
 
 
Please see the install instructions at:
     https
://pillow.readthedocs.io/en/latest/installation.html
 
 
Traceback (most recent call last):
   
File "/opt/tmp/pip-install-8yk71h5u/Pillow/setup.py", line 892, in <module>
      zip_safe
=not (debug_build() or PLATFORM_MINGW),
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/setuptools/__init__.py", line 145, in setup
     
return distutils.core.setup(**attrs)
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/core.py", line 148, in setup
      dist
.run_commands()
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/dist.py", line 955, in run_commands
     
self.run_command(cmd)
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj
.run()
   
File "/var/services/homes/admin/.local/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 223, in run
     
self.run_command('build')
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
     
self.distribution.run_command(command)
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj
.run()
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/command/build.py", line 135, in run
     
self.run_command(cmd_name)
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
     
self.distribution.run_command(command)
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj
.run()
   
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/distutils/command/build_ext.py", line 338, in run
     
self.build_extensions()
   
File "/opt/tmp/pip-install-8yk71h5u/Pillow/setup.py", line 687, in build_extensions
     
raise RequiredDependencyException(f)
  __main__
.RequiredDependencyException: zlib
 
 
During handling of the above exception, another exception occurred:
 
 
Traceback (most recent call last):
   
File "<string>", line 1, in <module>
   
File "/opt/tmp/pip-install-8yk71h5u/Pillow/setup.py", line 907, in <module>
     
raise RequiredDependencyException(msg)
  __main__
.RequiredDependencyException:
 
 
The headers or library files could not be found for zlib,
  a required dependency
when compiling Pillow from source.
 
 
Please see the install instructions at:
     https
://pillow.readthedocs.io/en/latest/installation.html
 
 
 
----------------------------------------
  ERROR
: Failed building wheel for Pillow
 
Running setup.py clean for Pillow
Successfully built docx
Failed to build lxml Pillow
Installing collected packages: lxml, Pillow, docx
   
Running setup.py install for lxml ... error
    ERROR
: Command errored out with exit status 1:
     command
: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"'; __file__='"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /opt/tmp/pip-record-e0uxnzoo/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /var/services/homes/admin/.local/include/python3.5m/lxml
         cwd
: /opt/tmp/pip-install-8yk71h5u/lxml/
   
Complete output (88 lines):
   
Building lxml version 4.5.0.
   
Building without Cython.
    ERROR
: b'/bin/sh: xslt-config: command not found\n'
   
** make sure the development packages of libxml2 and libxslt are installed **
   
   
Using build configuration of libxslt
    running install
    running build
    running build_py
    creating build
    creating build
/lib.linux-armv7l-3.5
    creating build
/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/__init__.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/usedoctest.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/builder.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/pyclasslookup.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/sax.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/doctestcompare.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/cssselect.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/_elementpath.py -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/ElementInclude.py -> build/lib.linux-armv7l-3.5/lxml
    creating build
/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/__init__.py -> build/lib.linux-armv7l-3.5/lxml/includes
    creating build
/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/__init__.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/usedoctest.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/soupparser.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/builder.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/diff.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/defs.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/html5parser.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/_setmixin.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/formfill.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/clean.py -> build/lib.linux-armv7l-3.5/lxml/html
    copying src
/lxml/html/_html5builder.py -> build/lib.linux-armv7l-3.5/lxml/html
    creating build
/lib.linux-armv7l-3.5/lxml/isoschematron
    copying src
/lxml/isoschematron/__init__.py -> build/lib.linux-armv7l-3.5/lxml/isoschematron
    copying src
/lxml/etree.h -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/etree_api.h -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/lxml.etree.h -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-3.5/lxml
    copying src
/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/config.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/uri.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/tree.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/__init__.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-3.5/lxml/includes
    copying src
/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-3.5/lxml/includes
    creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources
    creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/rng
    copying src
/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/rng
    creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
    copying src
/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
    copying src
/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl
    creating build
/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src
/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building
'lxml.etree' extension
    creating build
/temp.linux-armv7l-3.5
    creating build
/temp.linux-armv7l-3.5/src
    creating build
/temp.linux-armv7l-3.5/src/lxml
   
/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -mhard-float -mfpu=vfpv3-d16 -march=armv7-a -mcpu=marvell-pj4 -mtune=marvell-pj4 -DSYNOPLAT_F_ARMV7 -O2 -fno-diagnostics-show-caret -Wno-unused-local-typedefs -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=32 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/volume1/@appstore/py3k/usr/local/include/python3.5m -c src/lxml/etree.c -o build/temp.linux-armv7l-3.5/src/lxml/etree.o -w
    unable to execute
'/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc': No such file or directory
   
Compile failed: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
    cc
-I/usr/include/libxml2 -c /opt/tmp/xmlXPathInits12tvym5.c -o opt/tmp/xmlXPathInits12tvym5.o
    unable to execute
'cc': No such file or directory
   
*********************************************************************************
   
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
   
*********************************************************************************
    error
: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
   
----------------------------------------
ERROR
: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"'; __file__='"'"'/opt/tmp/pip-install-8yk71h5u/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /opt/tmp/pip-record-e0uxnzoo/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /var/services/homes/admin/.local/include/python3.5m/lxml Check the logs for full command output.


MH

unread,
Mar 5, 2020, 10:47:41 PM3/5/20
to Django users
I can also not install lxml via pip3. Here is a short part of the output:

 cc -I/usr/include/libxml2 -c /opt/tmp/xmlXPathInit80x1qqz_.c -o opt/tmp/xmlXPathInit80x1qqz_.o
    unable to execute
'cc': No such file or directory
   
*********************************************************************************

MH

unread,
Mar 5, 2020, 10:48:50 PM3/5/20
to Django users

So, even as someone who has not so much experience in these things I would say that I lack three things: libxml2, libxslt, and usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc


About the first two: I cannot do an apt-get. I am working on a synology diskstation.


What should I do?

Kasper Laudrup

unread,
Mar 5, 2020, 11:04:59 PM3/5/20
to django...@googlegroups.com
Hi MH,
You need a C compiler (eg. GCC as you suggested yourself). I have zero
experience with a Synology Diskstation, but a quick search seems like
it's far from trivial to get that to work.

You're most likely better of setting up an environment for cross
compiling on some other host and then target whatever the Synology
Diskstation is running.

While it's definitely possible, it's not an easy task if you have to
setup everything from scratch (which it seems like you have to).

Not much help I know, but just thought you should know that what you are
trying to achieve seems like it would require a lot of work.

Kind regards,

Kasper Laudrup

MH

unread,
Mar 6, 2020, 5:41:28 AM3/6/20
to Django users
Dear Kasper

I will google how I can do this cross compiling. Just recently a friend told me that this could not be done, because it would always have to be done on the same machine. I guess there is no way around that.

How would an environment help?

Best regards
MH

Kasper Laudrup

unread,
Mar 6, 2020, 6:59:31 AM3/6/20
to django...@googlegroups.com
Hi MH,

On 06/03/2020 06.41, 'MH' via Django users wrote:
> I will google how I can do this cross compiling. Just recently a friend
> told me that this could not be done, because it would always have to be
> done on the same machine. I guess there is no way around that.
>

Your friend is wrong. If you do embedded development it is quite common
to do your development on an x86 host and then cross compile for eg. an
ARM target.

How to do that all depends on your build environment and the target
host. There are projects specifically for that (eg. Yocto, buildroot)
and build systems like CMake supports that through toolchain files.

All of that is most definitely out of scope for what you are trying to
achieve.

> How would an environment help?
>

The environment is basically telling your toolchain (compiler, linker
etc.) where to find stuff like headers and libraries as well as telling
your build system to pick up the correct cross compiler so it will
generate code for your target system.

The "arm-unknown-linux-gnueabi-ccache-gcc" executable you mentioned
earlier is almost certainly a custom compiled version of GCC for
targeting the specific version of ARM on your target (your Synology
Diskstation) and other stuff (eg. the gnuabi part) required for
generating code that can execute on your target.

The environment (chroot, CMake toolchain file etc.) will then tell your
build scripts to use that compiler. Most often something as simple as
setting the CC environment variable to the path of that executable, but
that's only a small part of what is required.

My main point is still that this is not an easy thing to do. Most often
the vendor of the target (I guess that would be Synology in your case)
will provide a build environment for you that you could use as a
starting point.

Even when that is the case, in my experience there's often quite a lot
of tweaking to be done to get it all to work for your specific requirements.

In short. I have the fullest respect and understanding if you try to do
this. We all learn from trying out and experimenting with things we have
no previous experience with, that's how we get the experience after all,
but as someone who has worked professionally with embedded development I
would probably give up on this before I even started ;-)

Anyway, I wish you the best of luck.

Kind regards,

Kasper Laudrup

MH

unread,
Mar 6, 2020, 7:11:02 AM3/6/20
to Django users
Thanks Kasper,

I will think about this. Yes, it is kind of intimidating. But it is also too early for me to give up. And given all the praise for such NAS devices I am really somewhat angry when I see that it seems to be a too difficult challenge just to get small webserver with a few python scripts running that includes serving a document.

Best regards
MH

MH

unread,
Mar 6, 2020, 9:38:51 AM3/6/20
to Django users
Dear Kasper

Before I do something very difficult like this cross compiling I wanted to try to get gcc to run on the synology diskstation. But there is a general pip issue that I do not understand.

./pip3 search gcc
clang
-fake-gcc (0.2.1)          - A GCC-like compiler interface, but runs Clang instead. Isn't that neat?
gcc7 (0.0.9)                    - GCC v7 binaries
Demangler (0.2)                 - A demangler package for gcc 3.x and gcc 4.x
gccanalyze (0.1.2)              - Do static analysis with GCC.
gccoutputparser (0.1)           - Parses gcc/llvm output
gccinvocation (0.1)             - Library for parsing GCC command-line options
scons-tool-gcccov (0.1.2)       - SCons support for gcc code coverage features
nim-install (0.5.0)             - install nim compiler in Linux virtualenv assumes gcc
builddriver (0.8.0)             - Execute make, cmake, maven and parses gcc/llvm output
bcx-basic-compile-tool (v 1.0)  - bcx basic gcc compile tool works with any ide
resolve-march-native (0.9.4)    - Tool to determine what GCC flags -march=native would resolve into
cPrometheus (0.1)               - A monkey patch for prometheus_client, using GCC atomics for extra speed on CPython
ccsyspath (1.1.0)               - Find the system include paths for clang and gcc C/C++ compilers
fpvgcc (1.0.0)                  - Analysing code footprint on embedded microcontrollers using GCC generated Map files
Cpyx (0.2.2.0)                  - gcc/cython/distutils wrapper for compiling Cython and C code directly from python
minibuild (1.0.9)               - Build system aimed to be a pure Python alternative to GNU Make with builtin support of MSVS, GCC, clang


but  ...

./pip3 install gcc7
Defaulting to user installation because normal site-packages is not
writeable
ERROR
: Could not find a version that satisfies the requirement gcc7 (from versions: none)
ERROR
: No matching distribution found for gcc7

I thougth that everything found by pip3 search should automatically be available, shouldn't it?

Omar Abou Mrad

unread,
Mar 6, 2020, 9:44:43 AM3/6/20
to django...@googlegroups.com
Is it still working if you use runserver?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dabcc97a-c8d6-41d0-a695-cbaf94411093%40googlegroups.com.

MH

unread,
Mar 6, 2020, 4:05:42 PM3/6/20
to Django users
Hi Omar

Thanks for your help again. Indeed, runserver works depending on which python3 I am using. But I guess this is the problem. The python3 from /volume1/@appstore/py3k...and..so..on seems to work with gunicorn, but this is not the same python3 that works with docx. I still try to figure out which python3 on my system is invoked when I just enter python3.

MH

unread,
Mar 6, 2020, 4:10:09 PM3/6/20
to Django users
type -a python3
python3
is /opt/bin/python3
python3
is /usr/local/bin/python3

Can this actually be that a command leads to two binaries?

MH

unread,
Mar 6, 2020, 4:30:08 PM3/6/20
to Django users

From both folders I tried ./python3 -m pip install docx, but both resulted in an error message. Nevertheless, I know that one of the two works with docx and runserver. So I guess, I installed it somehow in a different way and one of the python3s can use that.


Ha, so I found a package in /volume1/homes/admin/.local/lib/python3.8/site-packages/docx. As there is no other, I would say that however I got it there, this must be it. Could I just copy it to other site-packages folders?

MH

unread,
Mar 6, 2020, 4:42:13 PM3/6/20
to Django users
No ... I cannot just copy it. Then it is asking for lxml again.

ImportError: No module named 'lxml


Kasper Laudrup

unread,
Mar 6, 2020, 8:01:22 PM3/6/20
to django...@googlegroups.com
Hi MH,

On 06/03/2020 10.38, 'MH' via Django users wrote:
> Before I do something very difficult like this cross compiling I wanted
> to try to get gcc to run on the synology diskstation.

That definitely sounds like a very good idea. As I mentioned I have zero
experience with the Synology Diskstation, but if you can somehow install
a compiler directly on the target, that would be much, much easier.

> ./pip3 search gcc
> clang-fake-gcc (0.2.1)-A GCC-like compiler interface,but runs
> Clanginstead.Isn't that neat?
> gcc7 (0.0.9)                    - GCC v7 binaries

So it seems like both GCC and Clang is available on the target. That's
definitely promising.

> ./pip3 install gcc7
> Defaultingto user installation because normal site-packages isnotwriteable
> ERROR:Couldnotfind a version that satisfies the requirement gcc7
> (fromversions:none)
> ERROR:Nomatching distribution found forgcc7
> |
>

The error message is clear enough. Your global site-packages directory
is not writeable for the current user. I cannot see why that wouldn't be
a problem for any other packages you install with pip?

Have you somehow installed some packages as root and some as another user?

> I thougth that everything found by pip3 search should automatically be
> available, shouldn't it?
>

That definitely depends on the package. It's easy enough to create a pip
package that won't install anywhere :-)

Anyway, I don't have that much more to contribute with, sorry. I mostly
replied because I do have some experience with cross compilation and
wanted to give my input.

Best of luck with your experiment.

Kind regards,

Kasper Laudrup

MH

unread,
Mar 7, 2020, 7:42:39 AM3/7/20
to Django users
Dear Kasper

Thank you very much. If you still read this, I would like to ask a question about cross compilation. I found this developers guide from Synology: https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_NAS_Server_3rd_Party_Apps_Integration_Guide.pdf

It starts very easy to follow and I followd the link to the github repository as mentioned on page 7. There I selected "Marvell Armada 370 Linux 3.2.40" as this corresponds with my current linux version and the DS 213j. However, I have problems with the following steps.

Page 11 shows how I should set environment variables. But not everything works.

The PDF says:

# env CC=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc \
LD=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ld \
RANLIB=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ranlib \
CFLAGS="-I/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/include-mhard-float -mfpu=vfpv3-d16" \
LDFLAGS="-L/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/lib" \
./configure \
--host=armle-unknown-linux \
--target=armle-unknown-linux \
--build=i686-pc-linux" \
--prefix=/usr/local


There are also further questions like "do I have to insert the backslashes?" but my more important question is around "how should I adapt these recommendations to my case?"

The toolchain that I extracted to /usr/local on my desktop PC has a different name. The folder is called "arm-unknown-linux-gnueabi". In the bin folder I can find many files starting with "arm-unknown-linux-gnueabi". There are also several gcc files. gcc itself, but also gcc-4.9.3, gcc-ar, gcc-nm, gcc-ranlib and there is a also a file which ends on -ld.

However, there is no libc folder. When go back from the bin folder, then there is just "lib" and in it "gcc". Then there is another "arm-unknown-linux-gnueabi" folder and in it "4.9.3". But in there and in the following subfolders I cannot find a file called include-mhard-float

So, I do not even know what I am doing there, I am just trying to adapt this to the available files.

Could you point me in the right direction?

MH

unread,
Mar 7, 2020, 7:43:58 AM3/7/20
to Django users
PS: The content of the last mentioned folder looks like this:

/usr/local/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.9.3$ ls *
crtbegin
.o  crtbeginS.o  crtbeginT.o  crtend.o  crtendS.o  libgcc.a  libgcc_eh.a  libgcov.a

finclude
:

include
:
arm_acle
.h  float.h   mmintrin.h  sanitizer  stdalign.h  stdatomic.h  stddef.h  stdint-gcc.h  stdnoreturn.h        unwind.h
arm_neon
.h  iso646.h  omp.h       ssp        stdarg.h    stdbool.h    stdfix.h  stdint.h      unwind-arm-common.h  varargs.h

include
-fixed:
limits
.h  README  syslimits.h

install
-tools:
fixinc_list  gsyslimits
.h  include  macro_list  mkheaders.conf

plugin
:
gtype
.state  include



Kasper Laudrup

unread,
Mar 7, 2020, 8:08:26 AM3/7/20
to django...@googlegroups.com
Hi MH,

On 07/03/2020 08.42, 'MH' via Django users wrote:
> Dear Kasper
>
> Thank you very much. If you still read this, I would like to ask a
> question about cross compilation. I found this developers guide from
> Synology:
> https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_NAS_Server_3rd_Party_Apps_Integration_Guide.pdf
>

Cool that you haven't given up and that you're trying to figure things
out on your own. That's the best way to learn.

To answer a few specific questions:

> # env
> CC=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc \
> LD=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ld \
> RANLIB=/usr/local/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-ranlib
> \
> CFLAGS="-I/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/include-mhard-float
> -mfpu=vfpv3-d16"\
> LDFLAGS="-L/usr/local/arm-marvell-linux-gnueabi/arm-marvell-linux-gnueabi/libc/lib"\
> ./configure \
> --host=armle-unknown-linux \
> --target=armle-unknown-linux \
> --build=i686-pc-linux" \
> --prefix=/usr/local
> |
>
>
> There are also further questions like "do I have to insert the
> backslashes?"

The backslash is used for escaping characters so they will not get
interpreted by the shell. In this case it's a new line character.

As you probably now, entering a new line character tells the shell to
execute the current command, if you have a long line, it is often more
readable to split it into several lines like has been done in this PDF.

It is similar to how you need to escape spaces in a filename containing
spaces since arguments to the command is most often separated by space.
Eg. doing:

# rm my filename

Will tell the shell to remove the files called "my" and "filename" while:

# rm my\ filename

Will tell the shell to remove a file called "my filename".

So in short, yes you need the new lines.

In this case this is used to change the environment variables used by
the configure command, but only for this command.

Doing something like:

# FOO=42 ./bar

Will set the value of FOO to 42 for the "bar" command, but set it back
to its previous value (or nothing) after "bar" has exited.

The configure command needs to know where to find the C compiler (and a
bunch of other stuff) I hope you can guess how you tell it where to find it.


> but my more important question is around "how should I
> adapt these recommendations to my case?"
>

That's they tricky part, since that is completely up to you to figure
out :-)

> The toolchain that I extracted to /usr/local on my desktop PC has a
> different name. The folder is called "arm-unknown-linux-gnueabi". In the
> bin folder I can find many files starting with
> "arm-unknown-linux-gnueabi". There are also several gcc files. gcc
> itself, but also gcc-4.9.3, gcc-ar, gcc-nm, gcc-ranlib and there is a
> also a file which ends on -ld.
>

Most of these are most likely symbolic links. Try running:

# ls -l

Instead, you should most likely get a visual idea of what that means.

> However, there is no libc folder. When go back from the bin folder, then
> there is just "lib" and in it "gcc". Then there is another
> "arm-unknown-linux-gnueabi" folder and in it "4.9.3". But in there and
> in the following subfolders I cannot find a file called
> |include-mhard-float|
>
> So, I do not even know what I am doing there, I am just trying to adapt
> this to the available files.
>
> Could you point me in the right direction?
>

Sorry, that's a bit too specific to the your Synology setup. I hope my
answers have been helpful anyway. It's pretty basic Unix stuff, so sorry
if it was obvious to you already, but it's extremely good to know these
things.

Good luck.

Kind regards,

Kasper Laudrup

Ps.
All of this is extremely off topic considering this is mailing list for
Django users. Hope everyone else is OK with that.

MH

unread,
Mar 7, 2020, 9:04:34 AM3/7/20
to Django users
Dear Kasper

Thanks a lot. Yes, this has been too far away from django. But thanks nevertheless!

Best regards
MH
Reply all
Reply to author
Forward
0 new messages