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

"test @sym/intersect" failed #1315

Open
dasergatskov opened this issue Nov 30, 2024 · 5 comments
Open

"test @sym/intersect" failed #1315

dasergatskov opened this issue Nov 30, 2024 · 5 comments

Comments

@dasergatskov
Copy link

With octave 10..0 symbolic 3.2.1 and current git clone of SymPy

commit ba68537e73dd40fb34fa9c5aaf46c5a6e1ef12c7 (HEAD -> master, origin/master, origin/HEAD)
Merge: 357ede9874 e0f229da64
Author: Björn Dahlgren <bjodah@gmail.com>
Date:   Wed Nov 27 07:40:39 2024 +0100

I see:

octave:5> test @sym/intersect
***** test
 % empty input
 A = sym([1 2]);
 C = intersect(A, []);
 assert (isequal (C, sym([])))
!!!!! test failed
assert (isequal (C, sym ({}))) failed
octave:6> A = sym([1 2])
A = (sym) [1  2]  (1×2 matrix)
octave:7> C = intersect(A, [])
C = (sym) []  (empty 1×0 matrix)
octave:8> sym([])
ans = (sym) []  (empty 0×0 matrix)
@Sonu0305
Copy link
Contributor

Hi @dasergatskov ,
I think this test failing was fixed in #1311
Thank You!

@dasergatskov
Copy link
Author

Thanks. "make test" on git pull passed, but I cannot install it. After "make dist":

octave:1> pkg install -verbose ./symbolic-3.2.1+.tar.gz 
mkdir (/var/folders/ds/5xsh6x4914x78jswflyz20c40000gn/T/oct-YDETJd)
untar (./symbolic-3.2.1+.tar.gz, /var/folders/ds/5xsh6x4914x78jswflyz20c40000gn/T/oct-YDETJd)
error: dirlist(3): out of bound 2 (dimensions are 2x1)
error: called from
    install at line 120 column 11
    pkg at line 619 column 9
octave:2> 

@dasergatskov
Copy link
Author

dasergatskov commented Nov 30, 2024

OK. I figured that out. My "tar" is BSD tar. My GNU tar is "gtar".
I modified Makefile:

diff --git a/Makefile b/Makefile
index 12dcbcb4..243798b5 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ HTML_TARBALL := ${HTML_DIR}.tar.gz
 
 OCTAVE ?= octave
 MATLAB ?= matlab
+TAR ?= tar
 
 .PHONY: help clean install test doctest dist dist_zip html matlab_test matlab_pkg
 
@@ -46,7 +47,7 @@ define create_tarball
 $(shell cd $(dir $(1)) \
     && find $(notdir $(1)) -print0 \
     | LC_ALL=C sort -z \
-    | tar c --mtime="$(GIT_DATE)" \
+    | $(TAR) c --mtime="$(GIT_DATE)" \
             --owner=root --group=root --numeric-owner \
             --no-recursion --null -T - -f - \
     | gzip -9n > "$(2)")

Then I used TAR=gtar make dist
and now it works.

@Sonu0305
Copy link
Contributor

@dasergatskov ,

Thanks for the update and for identifying the issue with the tar command.
Given the modification you made to the Makefile to work with BSD tar and the fact that using gtar seems to resolve the issue for you, would you suggest that this change be incorporated into the repository? Specifically, should we create a pull request to update the Makefile to support both BSD tar and GNU tar, or do you think this adjustment is not required for the main codebase?
Looking forward to your input, Thank You.

@dasergatskov
Copy link
Author

I think make this change in the main code-base is a good idea.

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